Nomenclature and Syntax

Some of the terms associated with CSS can be quite confusing, so we’ve added a short introduction to how we name things in the book. Also, there are two different syntaxes for writing Sass that need to be distinguished.

A Brief CSS Recap

We thought it would be useful to go through a couple of technical terms we’ll be using for different aspects of CSS markup. If you’re already familiar with selectors, declaration blocks, and the like, you can probably skip this part.

Let’s use a small bit of CSS as an example:

 
p​ {
 
color: #336699;
 
font-size: 2em;
 
}

Here we have p, which we call the selector. What follows (the bit inside the curly braces) is the declaration block. The two lines—one defining the color and one defining ...

Get Pragmatic Guide to Sass now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.