-
-
Notifications
You must be signed in to change notification settings - Fork 75
extend progressive-custom-properties
to the var()
function
#979
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
Merged
romainmenke
merged 6 commits into
main
from
extend-progressive-custom-properties-to-var-function--unassuming-electric-eel-ccf9c8cf85
Jun 1, 2023
Merged
extend progressive-custom-properties
to the var()
function
#979
romainmenke
merged 6 commits into
main
from
extend-progressive-custom-properties-to-var-function--unassuming-electric-eel-ccf9c8cf85
Jun 1, 2023
Conversation
This file contains hidden or 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
romainmenke
commented
May 26, 2023
…nassuming-electric-eel-ccf9c8cf85' of https://github.com/csstools/postcss-plugins into extend-progressive-custom-properties-to-var-function--unassuming-electric-eel-ccf9c8cf85
…stom-properties-to-var-function--unassuming-electric-eel-ccf9c8cf85
@@ -58,7 +58,7 @@ The `preserve` option determines whether the original functional color notation | |||
is preserved. By default, it is not preserved. | |||
|
|||
```js | |||
postcssImageSetFunction({ preserve: true }) | |||
postcssColorFunctionalNotation({ preserve: true }) |
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.
Nice catch!
Antonio-Laguna
approved these changes
Jun 1, 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.
This LGTM!
Thanks a lot for adding support for all of these plugins!
…function--unassuming-electric-eel-ccf9c8cf85
thank you for reviewing all this 🙇 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
plugin-packs/postcss-preset-env
plugins/postcss-color-function
plugins/postcss-color-functional-notation
plugins/postcss-custom-properties
plugins/postcss-double-position-gradients
plugins/postcss-gradients-interpolation-method
plugins/postcss-ic-unit
plugins/postcss-lab-function
plugins/postcss-oklab-function
plugins/postcss-progressive-custom-properties
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.
see : #978
There are two possible ways to generate fallbacks for this case :
A : resolve
var()
firstB : resolve
functional notation
firstOption B is what we want in this case because it happens to cover a more interesting range of browsers correctly.
But it also makes it harder to first resolve
var()
so that we can fallback features with a more complex syntax. (e.g.color(var(--space) 0 0 0)
)The correct solution to both issues is to extend the functionality of
progressive-custom-properties
so that any value that requires fallbacks and contains avar()
function is placed in a@supports
check for both that feature andvar()
.