3 ms·
Will do. I've heard people on Freenode IRC telling me that while Compass is a great library, Stylus is the superior language. I certainly was a fan of Sass over
by cmwelsh 14y ago
Will do. I've heard people on Freenode IRC telling me that while Compass is a great library, Stylus is the superior language. I certainly was a fan of Sass over SCSS, and I like how Stylus reminds me of that.
- jenius 14y agoFor sure. I actually built roots on top of sass originally, and I became frustrated with it's limitations. I tried porting it to stylus because that was the only viable alternative that I knew of, and once I started working with it I couldn't go back. The only drawback to stylus is that sometimes you can get caught with ambiguity. But I've tried to make roots so that if you are just starting, you deal with that as little as possible.
- msutherl 14y agoI'd love to know what you didn't like about SASS.
- jenius 14y agoThe major advantages to stylus (rather than putting down sass, which i do still love) that I saw were these: - native css-style syntax for mixins - ability to pull properties from a parent (killer) - better programming logic and syntax - runs nicely on javascript and ruby - you can use brackets and semis or not without switching languages, and you can mix the two types of syntax - easy to build libraries for and import libraries into
- msutherl 14y agoI'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.