Custom properties
@css_var() reads a CSS custom property with a fallback. @css_vars() writes a custom property for every entry in a map, joining nested keys with dashes:
<let name="theme" value="{ primary: '#3355ff', surface: '#ffffff' }" />
.stack { gap: {@css_var('gap', '4px')}; } /* var(--gap, 4px) */
:root { { @css_vars($theme, 'theme') } } /* primary: '#3355ff' becomes --theme-primary: #3355ff; */Use these for a group of components that share a tint, border, blur or shadow: put the shared values in custom properties and override them where one differs. When a project needs groups of declarations with parameters, Sass mixins in a .ks.scss file can handle them.