3 ms·
This is what I was thinking as well. Apparently in SASS they only had mixins that work like classes and are included in the output and now the new "placeholders
by ville 14y ago
This is what I was thinking as well. Apparently in SASS they only had mixins that work like classes and are included in the output and now the new "placeholders" act like .mixin () {} in LESS.
The example also combines
hr {/* style /}
.separator {/ style /}
into one selector
hr, .separator {/ style */}
but maybe that is something a CSS minifier should be able to do?
- ianstormtaylor 14y agoNo, SASS had @mixins and @extend. And now it has @extend with %placeholders, which is the least bloaty solution of them all. Lots of the use cases mixins are touted as solving are actually much better solved by @extend'ing %placeholders.