Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #6869
Closed
Open
Issue created Apr 23, 2019 by Administrator@rootContributor

: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.

Assignee
Assign to
Time tracking