brumate

Style compilation

How the compiler scopes the CSS of a component, turns ${} values into custom properties, and puts the stylesheet on the page. Styles describes what to write.

Scoping

Variables

${expression} in CSS becomes a custom property, var(--s-<hash>-<n>), where n is the index of the expression.

SCSS and Less

With lang="scss" or lang="less", the preprocessor runs first, and the result is scoped as above.

On the page

compile also returns the stylesheet as css.