Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Daniel Shuy
    @daniel-shuy

    Hi all, I have a noob question:
    If a variable is defined with multiple parameters, eg.

    $padding = 4px 10px

    How can I get the 1st parameter of the variable (in this case 4px)?

    Daniel Shuy
    @daniel-shuy
    @qm3ster wow thanks! Stylus ftw
    Hum4n01d
    @Hum4n01d
    Anybody here used stylus with electron-compile
    target: 'electron-renderer',
    André
    @andrecavallari
    How can I use the embedurl ?? It's return the current url of the file instead of base64
    etune
    @etune
    how can I change the hue and increase the saturation of a hex color value?
    kevin olson
    @acidjazz
    /Users/k/.config/yarn/global/node_modules/stylus/bin/stylus:661
                  throw err;
                  ^
    ParseError: unexpected ","
        at Parser.error (/Users/k/.config/yarn/global/node_modules/stylus/lib/parser.js:259:11)
        at Parser.stmt (/Users/k/.config/yarn/global/node_modules/stylus/lib/parser.js:819:32)
        at Parser.statement (/Users/k/.config/yarn/global/node_modules/stylus/lib/parser.js:685:21)
        at Parser.parse (/Users/k/.config/yarn/global/node_modules/stylus/lib/parser.js:236:25)
        at Renderer.render (/Users/k/.config/yarn/global/node_modules/stylus/lib/renderer.js:80:22)
        at /Users/k/.config/yarn/global/node_modules/stylus/bin/stylus:655:15
        at tryToString (fs.js:512:3)
        at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:500:12)
    i dont understrand how im supposed to figure out whats wrong here
    so annoying sometimes how cryptic stylus errors are
    kevin olson
    @acidjazz
    last message september 19th dang
    Colton Colcleasure
    @colshacol
    Really wish there was a bigger Stylus community. It is hard to suggest when there is no news about it, articles, or anything. -_-
    @acidjazz unexpected ","
    Mihail Malo
    @qm3ster
    @colshacol There's Vuetify
    @acidjazz Consider the following: A stylus linter
    Not only will you be able to choose one style out of stylus' astronomical number of ways of writing the exact same thing, the parse errors will be right in your editor and not at runtime
    Jon
    @CookieJon

    @colshacol > Really wish there was a bigger Stylus community. It is hard to suggest when there is no news about it, articles, or anything. -_-

    Maybe now's the time to show the world your Stylus fan-fic?

    bm-stschneider
    @bm-stschneider
    Hello
    I have been trying to find good comparisons of sass/scss and stylus, can anyone tell me the gamechanger of stylus since I am unable to make out large differences :(
    I all seems to be the same except for a bit of syntax
    Or putting it a bit different. Is there any major benefit in migrating from sass/scss to stylus other than personal preference?
    kevin olson
    @acidjazz
    @qm3ster which linter do you use?
    Gavin McFarland
    @limitlessloop
    Hi @bm-stschneider the biggest difference for me was ability to use transparent mixin. Seems trivial but I like being able to create custom CSS properties/declarations.
    kevin olson
    @acidjazz
      flex 0 0 calc( 33% - unit($gap, px) )
    this gives me an error
    hmm
    Mihail Malo
    @qm3ster

    @acidjazz I suspect you might be looking for

    $gap = 3
    .himstdve
      display flex 0 0 s('calc( 33% - unit(%s, px))',$gap)

    which produces

    .himstdve {
      display: flex 0 0 calc( 33% - unit(3, px));
    }
    kevin olson
    @acidjazz
    thanks ill give it a shot
    Mihail Malo
    @qm3ster
    WOW
    were you sitting here all along
    wtf
    kevin olson
    @acidjazz
    12 days
    Mihail Malo
    @qm3ster
    Since the unit is static I actually recommend
    $gap = 3
    .himstdve
      display flex 0 0 s('calc( 33% - %spx)',$gap)
    Reminds me of my younger days when I made this function:
    interpolate(value_small, value_large, breakpoint_small, breakpoint_large)
      u = unit
      output_unit = u(value_small)
      unless output_unit == u(value_large) and output_unit == u(breakpoint_small) and output_unit == u(breakpoint_large)
        error('Different units')
      v_s = u(value_small, '')
      v_l = u(value_large, '')
      b_s = u(breakpoint_small, '')
      b_l = u(breakpoint_large, '')
      num_vw = 100 * (v_l - v_s) / (b_l - b_s)
      num_const = v_s + b_s * (v_s - v_l) / (b_l - b_s)
      return 'calc(%s + %s)' % (u(num_vw, vw) u(num_const, output_unit))
    Mihail Malo
    @qm3ster
    @acidjazz peep the second version so your output files aren't doing unit for no reason.

    You could use stylus' unit function, but there's no reason that I know of:

    $gap = 0
    .himstdve
      display flex 0 0 s('calc(33% - %s)', unit($gap, px))

    For example, with a gap size of 0 i still outputs a filthy calc(33% - 0px) instead of calc(33% - 0).
    Imagine automatically outputting calc(33%) or 33%!!!
    Maybe with PostCSS

    kevin olson
    @acidjazz
    hmm cool
    Is this the main stylus chat? is there a discord or a slack I don’t know about? why’s it so dead I wonder
    also we havent had a release in 2+ years now, yet i see all these PR’s go in of cool features/etc
    Mihail Malo
    @qm3ster
    @acidjazz Ur always here. Fork it, merge pull requests, start a discord :v:
    kevin olson
    @acidjazz
    @qm3ster as soon as I get time :)
    kevin olson
    @acidjazz
    i have a linear-gradient
    background-image linear-gradient(-45deg, fountain-blue 25%, transparent 25%, transparent 50%, fountain-blue 50%, fountain-blue 75%, transparent 75%, transparent )
    is there any way i can indent some of this ins stylus?
    Gideon Kreitzer
    @gidhon
    @lazytyper have a look at Platframe for a Stylus-based UI framework
    kevin olson
    @acidjazz
    it looks like that in css now, ! and ? are a thing
    immediate previous and general previous siblings
    and stylus def breaks when im try to rock that
    any workaround i wonder?
    kevin olson
    @acidjazz
    has anyone here gotten stylus setup with tailwind?
    kevin olson
    @acidjazz
    so it looks like our main issue is not support @apply and @nested