Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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
    Milan Košir
    @kosirm

    I'm trying to call function fluid-type like this and got error...

    for h, i in $headings
      .text-{h}
        line-height  em
        fluid-type($min-vw-target, $max-vw-target, $size{i+1}-min, $size{i+1}-max)

    Someone advanced in javascript please help

    Gavin McFarland
    @limitlessloop
    @kosirm perhaps someone can correct me on this, but I’m not sure if interpolation using {} is valid inside a variable. Perhaps that could be the issue?
    Milan Košir
    @kosirm
    Thanks for reply @limitlessloop I forgot about this... so sorry