Every project we've shipped this year has used Sass somewhere in the build. Not because it's fashionable, but because plain CSS makes you repeat yourself constantly, and repetition is where stylesheets rot. Sass (Syntactically Awesome StyleSheets) solves that by compiling a more capable language down into ordinary CSS, so there's zero runtime cost and full browser support - the browser never even knows Sass was involved.
Variables end the copy-paste brand colour
The single feature that pays for itself fastest is variables. Instead of typing #1c6e63 in forty places and missing three of them during a rebrand, you name it once:
$brand-teal: #1c6e63;
$spacing-unit: 8px;
.button {
background: $brand-teal;
padding: $spacing-unit * 2;
}
Nesting mirrors your HTML
Nesting selectors the way the markup is actually structured keeps related rules physically close in the file, instead of scattered across a 2,000-line stylesheet in whatever order they were added:
.card {
border: 1px solid #ddd;
.title { font-weight: 600; }
&:hover { border-color: $brand-teal; }
}
It's worth a word of caution here: nesting four or five levels deep produces CSS selectors just as specific and just as hard to override later. Two or three levels is usually the healthy limit.
Partials and @import keep files small
Sass lets you split styles into small files - _buttons.scss, _forms.scss, _grid.scss - prefixed with an underscore so the compiler treats them as partials rather than standalone stylesheets, and pull them together in one place:
@import 'variables';
@import 'buttons';
@import 'forms';
Mixins for the patterns you repeat
Anything you find yourself writing more than twice - a clearfix, a flex row with consistent gaps, a button variant - is a candidate for a mixin:
@mixin button-variant($bg, $fg: #fff) {
background: $bg;
color: $fg;
}
.button--danger { @include button-variant(#c0392b); }
Getting it compiling
On the command line, Ruby Sass (soon to be superseded by the faster LibSass/node-sass toolchain) will watch a folder and rebuild on save:
sass --watch scss/style.scss:css/style.css
That's genuinely most of what a small team needs day to day. Start with variables and nesting, add mixins once a pattern repeats three times, and resist the urge to nest everything just because you can.
Nesting and variables - the two features that hooked everyone
$primary: #1c6e63;
.card {
border: 1px solid $primary;
&__title { font-weight: 600; }
&:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
}
Nesting selectors to match the DOM structure they style, and variables for values reused across a stylesheet, were both genuinely missing from CSS for years - Sass's popularity was largely built on filling exactly those two gaps before native CSS caught up with custom properties and nesting of its own.
Mixins and partials scale the workflow up
A mixin bundles a reusable set of declarations - a common flexbox centering pattern, a standard button reset - into something callable with @include instead of copy-pasted across files. Splitting a large stylesheet into partials (_buttons.scss, _forms.scss) and pulling them together with @use keeps a growing codebase navigable in a way a single thousand-line CSS file never stays.