Sass: @-Rules and Directives

While CSS isn’t a programming language, it includes some programming-like features. For example @-rules provide a simple control mechanism for running one block of code instead of another. Sass as you would guess extends these rules and provides a few of its own.

Continue reading

How To Use Sass Variables

Think of all the times you might add the same color to different elements or classes in your CSS file and then think of all the fun you have changing everything when you decide another color would work better. Wouldn’t you prefer to make the change once and have the rest update automatically?

Continue reading

The Pros and Cons of Nesting Your Sass Code

Nesting can be a good way to organize your Sass code. It can also lead to specificity problems if you nest too deeply. You don’t have to look to far to find people who’ll tell you how wonderful nesting is or how the universe might cave in on itself if you attempt to nest your code.

The truth as usual is somewhere in between the extremes.

Continue reading

How To Nest Selectors And Properties In Sass

Do you want to write CSS that’s well organized, easier to read, and easier to maintain? Nesting is a feature of Sass that can help you keep related selectors and properties together to make your code more readable and maintainable.

Continue reading

Introduction to Sass — Part 2

If you’ve never worked with Sass or another CSS preprocessor before, you might be surprised how easy they are to use. It’s as easy to get started writing Sass as writing the CSS you already know.

Continue reading