Clean, beautiful code should be a goal in every project. If other developers need to make a change, they should be able to read what is there and understand it. Readable code is the core of maintainability. This excerpt from Miriam’s book, Jump Start Sass will help get you started…
This is hands down the best book on Sass if you want to learn the most important parts of the Sass language that will help you architect a good application.
Miriam and Hugo have become some of the most notable creators of Sass plugins and best practices.
- Foreword –
by Chris Eppstein
- Hello World –
An introduction to Sass in modern front-end development, its history, its syntaxes (Sass and SCSS) as well as its competitors (LESS, Stylus and PostCSS).
- Getting Started –
A short explanation on how to install Sass binaries (both the Ruby gem and node-sass) and how to use them to compile Sass stylesheets to CSS.
- Variables –
An extensive chapter on variables, how they work, how to use them, when and why, closed with a comparison with CSS Custom Properties.
- Functions & Mixins –
A chapter dedicated to mastering functions and mixins to start building small systems.
- Loops & Conditions –
A concise explanation of how logical structures work in Sass, mainly loops and conditions statements, and how to use them to build powerful mixins.
- Nesting –
A reminder on the nesting feature, mostly focused on selector nesting, providing helpful tips to avoid being lost in the dreaded horizontal pyramid of selectors.
- Extend –
A solid introduction to the
@extenddirective and how to avoid bloated output when using it.
- Warnings & Errors –
An introduction to the ability to emit warnings and throw errors directly from within stylesheets, as well as why and when doing so makes sense.
- *Architecture –
A massive chapter on different approaches to Sass-powered project architecture, including OOCSS, ITCSS, SMACSS and more.
- *Ecosystem –
The final chapter introduces you to the Sass ecosystem, its main toolkits, libraries and frameworks such as Bourbon, Susy, Accoutrement, SassDoc, Sass-Guidelines, Modular Scale, SCSS-lint and many many more.
- Link resource type
- Link resource type
I’m excited to release Jump Start Sass, a book I co-authored with Hugo Giraudel. Digital copies are available from SitePoint, wih print editions sold by O’Reilly. Here’s an excerpt from Chapter 11, Sass Architecture.