CSS preprocessor

A tool such as Sass or Less that takes an extended stylesheet language and compiles it into plain CSS before the browser sees it.

In more detail

Preprocessors added variables and nesting long before CSS had them. Their variables vanish at compile time, so changing a theme meant building a whole new stylesheet. CSS custom properties now do this at run time in the browser.

Example

In the browser: Preprocessor variables are replaced at build time, while CSS custom properties exist in the browser and can change at runtime. Native CSS nesting now covers the most common reason for using a preprocessor.

Related terms

Taught in

References