Home SASS
Post
Cancel

SASS

SASS or SCSS is a CSS preprocessor. It allows you to use variables, functions, and other features that don’t exist in plain CSS.

To install SASS, run:

1
npm install -g sass

To compile a .scss file to .css, run:

1
sass file.scss file.css

If you want to compile a .scss file to .css and watch for changes, run:

1
sass --watch file.scss file.css

Essentialy valid CSS is valid SCSS

Variables

1
2
3
4
5
$color: #000;

body {
  background-color: $color;
}
This post is licensed under CC BY 4.0 by the author.