Description
Describe the bug
Using a percentage value for the opacity
CSS value will work fine in development with HMR, but the minified bundle will incorrectly set all opacity values to 1%.
Did you try recovering your dependencies?
Can reproduce with a fresh CRA app.
Environment
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Binaries:
Node: 12.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.9.4 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 42.17134.1038.0
Internet Explorer: 11.0.17134.1
npmPackages:
react: ^16.11.0 => 16.11.0
react-dom: ^16.11.0 => 16.11.0
react-scripts: 3.2.0 => 3.2.0
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
- Create a new CRA app.
- Open
App.css
and addopacity: 70%
to the .App-header class. - Run
yarn start
. Inspect the header element and confirm that the opacity is 70%. - Run
yarn build
. Once the build is finished, open the minified css file inbuild/static/css
. Search foropacity
and observe that it is 1%.
Expected behavior
The opacity value should be minified as the same value in the source file.
Actual behavior
The opacity value is 1% no matter what percentage is used.