PG

← back to blog

Why CSS variables beat SCSS variables

Stub seeded with research — references and current-state notes ready; prose still needs writing.

TL;DR

SCSS variables disappear at build time; CSS variables live in the browser — and theming, dark mode, and component scoping all happen in the browser.

Why it matters

(Draft prompt: a lot of stylesheets still ship SCSS variables for design tokens. The 2026 default has moved — Tailwind 4's pivot is the canonical signal. Frame as "Sass for compile-time authoring, CSS vars for everything the user can see change.")

Current state

Angle worth leaning into

SCSS vars are const, CSS vars are let for the browser.

Lead with the Tailwind 4 pivot as the "ecosystem has decided" moment, then land on the nuanced take: they solve different problems — Sass for compile-time authoring ergonomics (loops, mixins, math), CSS vars for everything the user can see change.

References

— Pierre