3 ms·
I'm not so sure Stylus is the superior language. SASS seems much more well supported and features like @extend: <http://sass-lang.com/docs/yardoc/file.SASS_REFE
by msutherl 14y ago
I'm not so sure Stylus is the superior language. SASS seems much more well supported and features like @extend: <http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#extend> http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#ex...; make a big difference.
EDIT: sorry, I meant @include: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#including_a_mixin http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#in...
- cmwelsh 14y agoStylus borrowed this feature from Sass. http://learnboost.github.com/stylus/docs/extend.html http://learnboost.github.com/stylus/docs/extend.html edit: You're right, @include's support for mixin bodies is not available :/ I am hoping Stylus adds this soon. It helps a lot for media queries.
- jenius 14y agoI prefer using mixins over extend, as they are more flexible and intelligent. If you don't structure your classes correctly it can lead to some code duplication, but frankly this doesn't make any speed difference after gzip anyway. To respond to your edit, stylus is as good at including mixins as sass. it's a lot less verbose in fact. you just run it as a function.
- msutherl 14y agoIt was this changelog that convinced me: http://sass-lang.com/docs/yardoc/file.SASS_CHANGELOG.html#320_10_august_2012 http://sass-lang.com/docs/yardoc/file.SASS_CHANGELOG.html#32... @extend, @include, % placeholder selectors. But I take your point about gzipping and from what I've read redundant CSS has a negligible effect on site performance.
- jenius 14y agoThe placeholder selectors are the one thing stylus does not have. I'd like to see if I can build that in and send a pull request at some point. But for a library like this I need flex and intelligence which means i'll be using mixins over placeholders anyway.