3 ms·
His elevator pitch doesn't sell for me. The color thing is correct. Having an easy way to handle that is neat. Right now i use templating, which serves fairly f
by Mithaldu 13y ago
His elevator pitch doesn't sell for me. The color thing is correct. Having an easy way to handle that is neat. Right now i use templating, which serves fairly fine.
However the reusable block makes no sense. That's what multiple classes on an element and selector lists are there for. I can't tell if SASS will still help me, since this is merely a bad example.
So it could mean that either he didn't think that through, the book isn't very good because of his lack of understanding, or that SASS is mostly fluff.
- awj 13y agoOther things that SASS does well at: * Wrapping up vendor specific properties. Put all of them into a mixin, use arguments for the value and any edge cases, be sure that all vendors are covered properly at each usage site. * @media directives in SASS can be used inside a style definition.[1] IME this makes heavy use of media sensitive styling significantly easier to read/manage. * Nested rules and nested properties[2] help to make your styling cleaner. If your html already has a very component-like structure nested rules can mimic that, which makes the overall design easier to manage. A lot of the functionality of SASS is geared around reusing bits of styling. Much of what you can do with it could also be done with multiple classes, but that generally comes at the cost of a class explosion as you parcel out the differences. It makes it easier to move more of the declaration of how your styling works into CSS itself, instead of the final styling being almost equal parts html (and classes) and CSS, with you as the developer/designer being responsible for remembering how all of the details fit together. [1] http://sass-lang.com/documentation/file.SASS_REFERENCE.html#media http://sass-lang.com/documentation/file.SASS_REFERENCE.html#... [2] http://sass-lang.com/documentation/file.SASS_REFERENCE.html#nested_properties http://sass-lang.com/documentation/file.SASS_REFERENCE.html#...