:global() css stopped working in CRA v3.
Created by: raRaRa
Is this a bug report?
Yes
Did you try recovering your dependencies?
Yes. yarn 1.15.2
Which terms did you search for in User Guide?
global css modules global styles
Environment
Environment: OS: Windows 10 Node: 8.11.1 Yarn: 1.15.2 npm: 6.4.1 Watchman: Not Found Xcode: N/A Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842
Packages: (wanted => installed) react: ^16.8.6 => 16.8.6 react-dom: ^16.8.6 => 16.8.6 react-scripts: 3.0.0 => 3.0.0
Expected Behavior
I expected the global styles to work like previously.
On (CRA v2) I was using :global(a) { ... }
in my index.scss file to set global style for links. After upgrading to CRA v3 it stopped working.
Actual Behavior
Global styles are ignored.
Reproducible Demo
https://codesandbox.io/s/20w902rmk0
I tried to create another demo to show it working on the previous CRA version, but it didn't work. Strange. Perhaps I misunderstood global styles, but I have no clue why it's been working for me for over a year until now.