-
Notifications
You must be signed in to change notification settings - Fork 188
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
lowering for oklch
does not work when using numeric or mixed values
#809
Comments
oklch
does not work when using numeric valuesoklch
does not work when using numeric or mixed values
Aside: should the extra conversion from There could be some slight differences between the color formats. I noticed a difference in precision too. For example, |
Id also like to understand the conversion from oklch to lab, was expecting to still see oklch in the final css 🤓 |
That commit was reverted in 81cd955 . At some point the spec changed to accept numbers or percentages for all components instead of one or the other. Unfortunately this is a breaking change for Lightning CSS because it changes the way calcs work. There is a PR #465 to update to the latest spec, but it is now waiting for a major version release unfortunately. In the meantime, you can use percentages. As for the conversion to lab, that's because you have specified browser targets that do not support |
Thanks for the response. That's unfortunate about the breaking change, but using percentages is not a big deal I suppose. I'm not sure that the reasoning for the |
That's true. I guess Safari was the difference. 15 supported lab and 15.4 added support for oklab. In this case you aren't targeting any Safari browsers so it could probably be avoided. |
Currently, lightningcss lowers the following correctly (albeit with an unnecessary conversion from
oklch
tolab
):Whereas the following are ignored completely:
See playground.
I came across a similar issue (#445) which was closed by 835e5bc, but it doesn't work in the latest version.
The text was updated successfully, but these errors were encountered: