CSS functions compute values dynamically and reduce repetitive hard-coded declarations.
High-value functions
calc(),min(),max(),clamp()- Color/gradient functions
var()for custom properties
Important interview questions and answers
- Q: Why use clamp in typography?
A: Smoothly bounds scaling between min and max sizes. - Q: calc common pitfall?
A: Poor readability and complex formulas without comments/context. - Q: var fallback syntax?
A:var(--token, fallbackValue).
Practice: Change one property in the playground and observe cascade + layout in DevTools.