2 ms·
Other 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
by awj 13y ago
Other 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#...