New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for css @property
#1092
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for the PR! This looks really great. To me this is just an extension of our current So I think we'd need to make the following changes for now:
|
hey @markdalgleish, thanks for your feedback! Updated the code, pls let me know if I need to change something else |
@markdalgleish thanks for cleaning this up! is there something I should address before merging? |
@markdalgleish any updates here, i'm really waiting for this feature? |
This would be a nice addition. Currently I can only use properties using globalStyle with a @ts-ignore. That feels a bit dirty globalStyle(`@property --headerBackground1`, {
// @ts-ignore
syntax: `'<color>'`,
initialValue: colorPrimitives.neutrals.whites.W100,
inherits: false,
}); |
I'd like to bump this and see it land! 🙏 This would be a great feature for our design system to use. |
This PR adds support for CSS @property feature.
createVar
- creates a@property
definition, returns property var formatvar(--propertyName)
createGlobalVar
- same ascreateVar
but with a predefined namegetVarName
- accepts a property var format and returns just a property namevar(--propertyName)
->--propertyName
example: