-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
The value of opacity in less was been modified by cssnano if I specificied the value in percent form #829
Comments
The reason for this issue has been located by my workmate.
|
seems like a bug. it should be if a number is greater than 1 like opacities range from or even if we can do with respect to the |
@anikethsaha feel free to send a PR with fix |
It is invalid syntax, please fix your code, invalid syntax is not allowed for minification |
Just in case anyone like me bumping into this issue in the future: #881 have fixed this, but there is no release including it, yet, as of 2020/4/20. For now, if you need cssnano, replace the percentage syntax is the easiest option. In CSS color 3, percentage for opacity is allowed, but CSS color 4 will make this sytnax (
And Chrome and Firefox seem to support it already; a short experiment also shows they do support percentage syntax of opacity. |
Well, just to clarify. If you are specifying the opacity in percentage like this:
Change it to:
And it will work like a charm! |
I had declared the opacity in percent form that maybe not a standard, and got the modification of value after processed by cssnano. Just like below picture
98% changed to 1%
The text was updated successfully, but these errors were encountered: