-
Notifications
You must be signed in to change notification settings - Fork 9
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
New rule: new-color-css-vars
#81
Conversation
🦋 Changeset detectedLatest commit: 821ef4d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just had a question
output: `<Button sx={{color: 'var(--fgColor-muted, var(--color-fg-muted))'}}>Test</Button>`, | ||
errors: [ | ||
{ | ||
message: 'Replace var(--color-fg-muted) with var(--fgColor-muted, var(--color-fg-muted))' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will folks always need to include a fallback value or is this an interim step as we're moving over to the new system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interim step! Once v8 is released and fully rolled out, we will refactor this to not include the fallback. We could also add some logic to remove the old fallbacks, but they won't really hurt anything if they stick around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it 🤩!
One tiny comment, do we need a docs page for this, or nah? (e.g. no-deprecated-colors
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🤩
I think we should add a documentation and include the rule in the README as well 🤗
@broccolinisoup @TylerJDev going to merge this and add the docs in a separate PR! |
Adds a new rule to update old color CSS variables with new variables, including a fallback value. This should only run on the
sx
prop as we have Stylelint in place to cover thestyled
syntax.