Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SCSS Opacity build bug?

Tags:

sass

reactjs

I use opacity: 100% or opacity: 40% in some SCSS code in my React app.

Works find in development mode.

But when I build, all the elements have their opacity set to 1%!!!

I've worked around this easily by using rgba colors and setting opacity there.

But, what is up with this???

like image 527
Jonathan Tuzman Avatar asked Feb 25 '20 22:02

Jonathan Tuzman


1 Answers

Sass never changes property values based on property names (see this example). I'm guessing you're using cssnano as well, in which case you're running into this bug for which a fix will be released soon.

like image 140
Natalie Weizenbaum Avatar answered Oct 07 '22 21:10

Natalie Weizenbaum