Looks like CSS is getting extensibility built-in with a new @property
element (works like @media
β also looks like we're getting CSS.registerProperty()
in JavaScript π€).
It'll work as below, and let you extend existing CSS functions with a similar syntax to CSS variables. Not 100% sure about how useful it will be, but it's always nice to see added flexibility and certainly the gradient animation use case provided in the example would have its purposes.
@property --my-property { syntax: '<color>'; initial-value: green; inherits: false; }