CodeZettaInterview Hub

SCSS · Variables · Fresh / Intern · Comparison

What are SCSS variables and how do they differ from CSS custom properties?

Short Interview Answer

SCSS variables are compile-time ($name); CSS custom properties are runtime (var(--name)) and cascade.

Detailed Explanation

Use SCSS vars for build-time theming tokens you do not need to change in the browser; use CSS variables for dynamic themes, dark mode toggles, and component-level overrides. Many design systems emit CSS variables from SCSS maps.

Did you know this answer?