CSS with superpowers
open sourceMITself-hostablefree
Sass is a stylesheet language that compiles to CSS, adding variables, nested rules, mixins, functions, flow control and a module system (@use and @forward) with built-in modules such as sass:math and sass:color. It has two syntaxes, the CSS-compatible SCSS and the indented syntax. Dart Sass is the primary implementation: a standalone command line compiler, the pure JavaScript sass package on npm, and sass-embedded, which wraps a JavaScript API around the Dart VM for speed. The original Ruby Sass reached end of life on 26 March 2019 and LibSass in October 2025; both point users to Dart Sass.
Problems it solves
- my stylesheets repeat the same colours and spacing values everywhere
- split a big CSS file into partials with shared variables and mixins
- nest selectors in my stylesheets instead of repeating the parent class on every rule
- generate a set of utility classes with a loop instead of writing each one by hand
- do math on lengths and colours in my styles, like darkening a brand colour
- customise Bootstrap's variables and build only the parts we use
- node-sass is deprecated and won't build on the new Node version
- migrate a stylesheet codebase off @import before it gets removed
- compile .scss files from Node in my build script
- compile stylesheets from the command line without installing Node
- share design constants between stylesheet files without leaking globals
- reuse a block of style declarations with parameters across components
- Ruby Sass stopped getting updates and our old asset pipeline still uses it
Features
- SCSS and indented syntaxes
- variables, nesting, mixins and functions
- module system with @use and @forward
- built-in modules: sass:color, sass:list, sass:map, sass:math, sass:meta, sass:selector, sass:string
- flow control with @if, @each, @for and @while
- pure JavaScript npm package (sass)
- sass-embedded npm package that runs the Dart VM
- standalone command line compiler for Windows, macOS and Linux
- JavaScript API
- compatible with all versions of CSS
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
Alternatives
The same job
These do what Sass does.
- Less It's CSS, with just a little more
- Lightning CSS An extremely fast CSS parser, transformer, bundler, and minifier
- PostCSS A tool for transforming CSS with JavaScript
