3 ms·
I 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
by jenius 14y ago
I 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.