Sass is a Cascading Style Sheets (CSS) meta language. It is a scripting language that is interpreted into CSS. SassScript provides the following mechanisms: variables, nesting, mixins, and selector inheritance.
Variables
- Sass allows variables to be defined.
- Variables begin with a dollar sign ($).
- Variable assignment is done with a colon (:).
- SassScript supports four data types: Numbers, Strings, Colors, Booleans.
Mixins
- CSS does not support mixins.
- Any repeated code must be repeated in each location.
- A mixin is a section of code that contains any valid Sass code.
- Whenever a mixin is called, the result of translating the mixin is inserted at the calling location.
- Mixins allow for efficient and clean code repetitions, as well as easy alteration of code.