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
Optimizing properties of level 2 removes hsl values #1181
Comments
Hey @Vatoth - I've only tested in latest Firefox and Chrome but |
Hello, @jakubpawlowicz. Yeah nice catch! I'm trying the lib without the deg and with I get it working by adding a comma to I'm using the hsl with "space-separated functional notation" https://caniuse.com/mdn-css_types_color_space_separated_functional_notation It's not supported by IE11, unfortunately :/ Thank you very much for your time. |
It's fixed on main branch, due in 5.3 today. |
@jakubpawlowicz - are you sure that's fixed? Using 5.3.0 and the same example as in the original post I get the same result as him - |
@boris-petrov 5.3.0 is the version used on https://clean-css.github.io/ - there it works just fine with the original bug report example. Is your case any different? Could be an edge case. |
@jakubpawlowicz - you can also reproduce the issue there - but be sure to enable |
My bad, you are right. Will look into it. |
It turned out clean-css.github.io didn't have 5.3.0 deployed. Now it works there. Tests also pass fine so it could be an edge case. |
@jakubpawlowicz not sure if the problem is on my side but I still get the same result on https://clean-css.github.io/ . Also, it still says it's using version 5.1.3, perhaps some caching issue? I did try with multiple browsers though. I also tried
.zone.contacts .size_1_3 > a {
border: 3px solid hsl(0deg 0 85%);
}
|
I see what's the problem: consider "hsl(0deg 0 85%)" vs "hsl(0deg 0% 85%)". Is hsl color supposed to work when second value is not given a percentage? Could it be fine only when the value is zero? |
Not sure about that, probably it is OK to not use percentage as in most places CSS accepts also zero without a unit. Also, here are more examples that are removed: .foo {
border-top: 0.063rem solid hsl(210deg, 10%, 24%);
}
.foo {
border-top: 0.063rem solid hsl(210deg, 10.8108108108%, 24.649859944%);
} |
Thanks, I'll dig into it. |
Precheck
Using 2 level, color values specified in hsl format are removed.
Similar to #1156
Environment
5.1.5
14.17.5
Linux 5.13.12
Configuration options
Input CSS
Actual output CSS
Expected output CSS
The text was updated successfully, but these errors were encountered: