8000 fix: global with pseudo element should be considered as global by roychoo · Pull Request #6317 · sveltejs/svelte · GitHub
[go: up one dir, main page]

Skip to content

fix: global with pseudo element should be considered as global #6317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
adjust test for global selector
  • Loading branch information
Conduitry committed Jun 22, 2021
commit f47b8391554d49045d41a6db918f26c4f2f00903
3 changes: 2 additions & 1 deletion src/compiler/compile/css/Selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,10 @@ class Block {

get global() {
return (
this.selectors.length >= 1 &&
this.selectors[0].type === 'PseudoClassSelector' &&
this.selectors[0].name === 'global' &&
!this.selectors.some((selector) => selector.type === 'ClassSelector')
this.selectors.every((selector) => selector.type === 'PseudoClassSelector')
);
}
}
Expand Down
0