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
{{ message }}
Repository navigation
[Bug] : postcss-colormin transforms z-index: 999999 to z-index: #999 #1113
Reacted by Ivan Ilinykh, Daniel Ksenofontov, Ivan Bashirov, Ruslan Sharipov, Sasha Chabin, Dmitry, Ian Routledge, greysellsup, Nadir Alfakesh, Lars Rye Jeppesen and 1 more
As a workaround you can change the z-index from 999 to 99 (or 9999). I believe the issue is that the new color parser we introduced in the release interprets any number that could work as a hex color as a hex color, so any sequence of 3, 4, 6 or 8 digits will get a hex in front or potentially convert to an rgb() value.
Reason being, it was the only way to use alpha on my colors. (e.g. color: rgba(var(--colorPageBackground), 0.5);)
This gets converted to the following:
Activity
evilPaprika commentedon May 20, 2021
I have the same problem. How can I get around this?
daks01 commentedon May 20, 2021
similarly with z-index range from 100 to 999
mynameisbogdan commentedon May 20, 2021
@evilPaprika disable colormin for now.
Since I'm using
css-minimizer-webpack-plugin:alexander-akait commentedon May 20, 2021
/cc @ludofischer I think high priority
romainmenke commentedon May 20, 2021
Example of the issue with minimal config :
https://github.com/romainmenke/cssnano-bug-1
michaelfaith commentedon May 20, 2021
This is affecting us as well via Angular 12 update. Adding hashes to some of our components' z-index.
fix(postcss-colormin): prevent interpreting all numbers as hex colors.
fix(postcss-colormin): prevent interpreting all numbers as hex colors.
ludofischer commentedon May 20, 2021
As a workaround you can change the z-index from
999to99(or9999). I believe the issue is that the new color parser we introduced in the release interprets any number that could work as a hex color as a hex color, so any sequence of 3, 4, 6 or 8 digits will get a hex in front or potentially convert to anrgb()value.fix(postcss-colormin): prevent interpreting all numbers as hex colors.
fix(postcss-colormin): prevent interpreting all numbers as hex colors.
enrique-ramirez commentedon May 21, 2021
Just to add my two cents: I have an issue where my
:rootvariables are being added the # as well. I store my variables as rgb values like this:Reason being, it was the only way to use alpha on my colors. (e.g.
color: rgba(var(--colorPageBackground), 0.5);)This gets converted to the following:
yellow1912 commentedon Oct 22, 2021
I wonder if this is still an issue, I'm on 5.0.8 and I have issue with tailwindcss, z-50:50 is converted to z-50:5, the trailing 0 is removed.
NVM, it was due to zindex reduction, I removed it.