The opacity value was changed to 1% after building the Reacjs project The opacity value was changed to 1% after building the Reacjs project reactjs reactjs

The opacity value was changed to 1% after building the Reacjs project


This issue has been reported in create-react-app and optimize-css-assets-webpack-plugin.

https://github.com/facebook/create-react-app/issues/7980

https://github.com/NMFR/optimize-css-assets-webpack-plugin/issues/118

It appears the bug has been fixed, but the latest released version does not have the fix. I've fixed the problem by changing my opacity values from nn% to 0.nn values (e.g. 70% becomes 0.7).


I think opacity accepts values in the range 0.0 to 1.0.Any value outside the interval, though valid, is clamped to the nearest limit in the range.In your example the nearest limit is clamped to 1%;

https://developer.mozilla.org/en-US/docs/Web/CSS/opacity