-
Notifications
You must be signed in to change notification settings - Fork 77
Custom Property as Fallback for Custom Property #208
Comments
Feel free to send PR! :) |
I think expected output for :root {
--my-background: #fff;
}
.three {
background-color: var(--my-var, var(--my-background, pink));
} should be: :root {
--my-background: #fff;
}
.three {
background-color: var(--my-var, #fff);
} What do you think? |
Hey @Semigradsky, thanks for the fast reply. Your suggestion would break browsers which doesn't support custom properties. Or am i wrong? |
But .three {
background-color: #fff;
} will break current browsers. What if we have defined |
I agree that you can’t replace the entire declaration, but it would be useful to be able to provide a fallback value when .three {
background-color: #fff;
background-color: var(--my-var, var(--my-background, pink));
} The fallback value represents the value I want to use when |
This is addressed by #240. |
Hello,
thanks for the awesome package and the great work.
I have found an issue when you have a Custom Property defined as Fallback of a Custom Property.
Given the following example:
Expected output should be:
The Current output if
--my-background
is defined is like this:In my opinion the current output is wrong and i would like to make a PR for this if you agree.
Thanks
The text was updated successfully, but these errors were encountered: