CodeZettaInterview Hub

SCSS · Variables · Fresh / Intern · Best Practice

Why prefer maps for design tokens over dozens of loose variables?

Short Interview Answer

Maps group related tokens and enable loops/functions to generate utilities systematically.

Detailed Explanation

$spacers: ("sm": 8px, "md": 16px) scales better. Combine with @each to emit CSS custom properties or utility classes.

Example

$colors: ("brand": #0a5, "danger": #c00);

Did you know this answer?