-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
negative shade percentage converts hex colour to rgba #1810
Comments
This is somewhat related to #1524, #1326 and similar... All this is easy to fix (and AFAIK it is the only proper way to fix) by rounding numeric values to a reasonable number of digits after decimal point on output. We just need to decide what this reasonable number is (2, 3, 4, 5, 6, more?). (Things like |
P.S. And a workaround for this particular case:
|
Looks like a good workaround @seven-phases-max, thanks for the tip. ;) |
I think anything more than 3 or 4 decimal places seems overkill. I presume 0.999999~ has to do with the precision (or imprecision) of floats in JavaScript math operations? |
On dotless we rounded to 2 then 4, then 6 decimal places as people We should probably round to 8 decimal places everywhere to avoid all |
We could simply expose this as an option (e.g. |
Fixed with #1814. |
I have noticed that this is happening:
which is a serious problem if you are dealing with IE8- or any other browser which doesn't support RGBA color specification.
When using an hexadecimal colour style by using the
shade
method, the same colour style would be expected back. However, this doesn't seem to happen when using positive values for the shade amount and it's also not applied to every negative values, but only some of them (probably floating numbers)The text was updated successfully, but these errors were encountered: