4 ms·
Yup, I've been using mixins for a while now to reduce code bloat. It seems like placeholders are degenerate forms of mixins. edit After more reading, they are
by lowboy 14y ago
Yup, I've been using mixins for a while now to reduce code bloat. It seems like placeholders are degenerate forms of mixins.
edit After more reading, they are most definitely not degenerate forms of mixins. Placeholders FTW!
- jenius 14y agoThe one advantage that extends provides is less code bloat (if you use them right) in the compiled product - rather than inserting the same code, extends will add the select to the list with the previous selector. So if you were to write something like this: .hello { color: red; } .world { @extends .hello; background: blue } ...it would compile to something like this: .hello, .world { color: red; } .world { background: blue; } na'mean?
- lowboy 14y agoI'm picking up what you're putting down, but I was thinking more placeholders vs. mixins. Although I guess placeholders would avoid this code bloat too, and they can be used as selectors.