cobalt-ui
cobalt-ui copied to clipboard
Feature: Add @property definitions to CSS plugin output
@property definitions help enable type safety for CSS Custom Properties.
MDN Docs: https://developer.mozilla.org/en-US/docs/Web/CSS/@property
It might be good to make a flag for this in the plugin too since defining property types is optional and adds extra weight to the output.
Suggested API:
// Types
interface Options {
// ...
propertyDefinitions?: boolean; // default: true
}
// Usage
pluginCSS({
propertyDefinitions: false
})
Hey! Would love to work on this!
@deecodess Sure! I’d be happy to have some help! But before you start, I’d love to see a proposal (maybe just as a reply to this issue) for what each DTCG token type would translate to in a @property declaration. That way we are on the same page!