scopeBehaviour: 'global' not remove :global() decl on rule
See original GitHub issueWhen using scopeBehaviour: 'global'
for below css rule:
body:global(.noselect){ user-select:none }
The :global
part is not removed, which result in invalid css selector.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Developers - scopeBehaviour: 'global' not remove :global() decl on ...
When using scopeBehaviour: 'global' for below css rule: body:global(.noselect){ user-select:none }. The :global part is not removed, which result in invalid ...
Read more >no-implicit-globals - ESLint - Pluggable JavaScript Linter
This rule disallows the following: Declarations that create one or more variables in the global scope. Global variable leaks. Redeclarations of read-only global...
Read more >postcss-modules - npm
styles.css */ :global .page { padding: 20px; } .title { composes: title ... the original class name will not to be removed from...
Read more >Python Scope & the LEGB Rule: Resolving Names in Your Code
If no match is found, then Python looks at the global and built-in scopes. ... Since var isn't declared global inside increment() ,...
Read more >Configuring Vite
But process or global should not be put into this option. ... You can use --force flag or manually delete the directory to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Having the same issue: i have a plugin that adds
:global(*someclass*)
to some selectors in my postcss and these “:global
”-s need to be removed later, but they don’t, so styles break. Tried different combinations of parameters formodules
,scopeBehaviour
andautoModules
, but nothing helped.I was dealing with a similar issue. I noticed that the
:global()
was removed when used within a local class but not when used within an element selector likea
orbody
. I removed the:global()
wrapping from the class within those tags, and it compiled correctly. So it seems that if the parent is not transformed, there’s no need to wrap a child in:global()
if the desired result should be global.