-
Notifications
You must be signed in to change notification settings - Fork 198
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
feat(tokens)!: Extract RGB color values into their own custom properties [CSS-383] #1590
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🚀 Deployed on https://pr-1590--spectrum-css.netlify.app |
4e393b2
to
948d5d2
Compare
55d9aad
to
6b653ae
Compare
553dc5b
to
60a2fef
Compare
60a2fef
to
b368331
Compare
a62f7d5
to
5666e3b
Compare
5666e3b
to
132e3e7
Compare
e5df757
to
455dcaa
Compare
pfulton
approved these changes
Apr 3, 2023
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.
oh my goodness, let's ship it!
455dcaa
to
7607ba1
Compare
7607ba1
to
9d4cf23
Compare
castastrophe
approved these changes
Apr 3, 2023
pfulton
approved these changes
Apr 3, 2023
9d4cf23
to
17a41d3
Compare
pfulton
approved these changes
Apr 3, 2023
2c73461
to
fadf7bb
Compare
5540791
to
f93bc33
Compare
pfulton
approved these changes
Apr 3, 2023
castastrophe
added a commit
that referenced
this pull request
Apr 3, 2023
…es (#1590) BREAKING CHANGE: transforms color tokens to split out their `rgb` values Co-authored-by: castastrophe <[email protected]>
castastrophe
added a commit
that referenced
this pull request
Apr 3, 2023
…es (#1590) BREAKING CHANGE: transforms color tokens to split out their `rgb` values Co-authored-by: castastrophe <[email protected]>
castastrophe
added a commit
that referenced
this pull request
Apr 3, 2023
…es (#1590) BREAKING CHANGE: transforms color tokens to split out their `rgb` values Co-authored-by: castastrophe <[email protected]>
castastrophe
added a commit
that referenced
this pull request
Apr 3, 2023
…es (#1590) BREAKING CHANGE: transforms color tokens to split out their `rgb` values Co-authored-by: castastrophe <[email protected]>
castastrophe
added a commit
that referenced
this pull request
Apr 4, 2023
…es (#1590) BREAKING CHANGE: transforms color tokens to split out their `rgb` values Co-authored-by: castastrophe <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking change
Results in a breaking API change
bug
Results from a bug in the CSS implementation
run_vrt
For use on PRs looking to kick off VRT
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
To solve our problem of needing to decouple the rgb values from their opacities in order to utilize them in our CSS while also continuing to support the existing values, this PR adds a new postcss plugin called
postcss-rgb-mapping
.This is a custom written plugin for this purpose but published separately: https://github.com/castastrophe/postcss-rgb-mapping
This plugin turns this:
Into this:
To maintain the existing codebase and add the rgb tokens, this parser separates out the rgb and opacity values and updates the old token to point to these new values. This approach maintains a single-source-of-truth while allowing for backwards compatibility.
To-do list
References