-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Description
CSS Custom Properties are a relatively new standard. Work is in progress to support them in Edge, and they're shipping today in Chrome, Safari, and Firefox.
Custom property usage is fairly straightforward, just an expression like var(--prop-name) or var(--prop-name, exprAsFallbackValue). The main tricky bit is that the allowed syntax for custom property values is extremely permissive, allowing stuff like:
body {
--js-might-read-this: if(x > 5) this.width = 10;
--my-theme: {
color: red;
background: white;
};
}The latter style does see real world usage today to implement mixins, and is reported as a syntax error in vscode as of v1.7.1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels