You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey!
LESS version 3.8.1 introduced outputting HSL color values as authored instead of their HEX counterparts (e.g. hsl(0, 0%, 76%) outputs hsl(0, 0%, 76%) instead of #c2c2c2 now), which is a really cool feature. However, using HSL colors with variable interpolation sometimes (depending on the color parameters) outputs the color slightly imprecisely (and very ugly):
This happens with and without the tilde, obviously.
I'm using two different colors here to demonstrate that not every value is outputted like this, e.g. hsl(0, 8%, 17%) is completely fine - notice here that the values are dependent of the others (with 17% lightness, the 8% saturation is suddenly fine).
However, not using variable interpolation works as expected:
I have also tried with HSV and RGB, but those ones are still being converted into their HEX counterparts, which is why I'm not sure whether the sudden HSL preservation is a feature.
This is tested using lessc on Windows 10.
A reason I can think of is that it's maybe caused by converting the HSL values into HEX and then back into HSL again, but what do I know.
I would expand the example a bit but the less playground is apparently not yet updated to 3.8.1+.
Hallo89
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey!
LESS version 3.8.1 introduced outputting HSL color values as authored instead of their HEX counterparts (e.g.
hsl(0, 0%, 76%)
outputshsl(0, 0%, 76%)
instead of#c2c2c2
now), which is a really cool feature. However, using HSL colors with variable interpolation sometimes (depending on the color parameters) outputs the color slightly imprecisely (and very ugly):(v3.8.1+)
expected result:
actual result:
This happens with and without the tilde, obviously.
I'm using two different colors here to demonstrate that not every value is outputted like this, e.g.
hsl(0, 8%, 17%)
is completely fine - notice here that the values are dependent of the others (with 17% lightness, the 8% saturation is suddenly fine).However, not using variable interpolation works as expected:
result:
I have also tried with HSV and RGB, but those ones are still being converted into their HEX counterparts, which is why I'm not sure whether the sudden HSL preservation is a feature.
This is tested using lessc on Windows 10.
A reason I can think of is that it's maybe caused by converting the HSL values into HEX and then back into HSL again, but what do I know.
I would expand the example a bit but the less playground is apparently not yet updated to 3.8.1+.
Hallo89
The text was updated successfully, but these errors were encountered: