When it comes to CSS Preprocessors, there are 2 big ones: Sass and Less. In Matt’s presentation he covers Sass stating that the two really have about the same features and Sass just has a bigger following.
Slides will go here when Matt sends them!
Key Features of Sass
- Support for Variables
- Nested rules
- Interpolation (being able to use a variable in the name of CSS selectors)
- Conditional logic (if/else statements)
- Looping (for, each and while loops)
- Debugging support
Sass in WordPress
Automattic’s _s theme (pronounced “Underscores”) uses Sass by default. It is also a good reference of how to setup your Sass files for ease of use. Check out _s’s Sass folder here.
Useful Tips
- Want to try out your own Sass code online? Check out http://sassmeister.com
- Matt showed some of his code and noted that he keeps a Sass file called shame.scss for all of his “hacks” he is not proud of…I like the idea