April 2013
Intermediate to advanced
274 pages
5h 39m
English
Nesting @extend and placeholder selectors are very convenient but they don't actually produce extra code. Mixins on the other hand do. Those readers who have been unfortunate enough to use Microsoft Word or Excel may have used macros. If so, think of mixins like macros.
Typically, a mixin is defined once, then included elsewhere in the Sass file and passed any optional arguments. Then, on compilation, it generates the relevant code.
That sounds pretty complicated and "programmer-ish". If such talk makes your palms go a little sweaty or your eyes glaze over, don't worry.
Compass has literally hundreds of ready-made mixins that address every conceivable CSS need. Don't want to ...
Read now
Unlock full access