Skip to content

Commit 7aeeeb0

Browse files
authored
Update packages/svelte/src/compiler/phases/2-analyze/css/css-analyze.js
1 parent fdff04f commit 7aeeeb0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/svelte/src/compiler/phases/2-analyze/css/css-analyze.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,13 @@ const css_visitors = {
133133

134134
node.metadata.is_global = node.selectors.length >= 1 && is_global(node);
135135

136-
if (node.selectors.length >= 1) {
136+
if (
137+
node.selectors.length >= 1 &&
138+
node.selectors.every(
139+
(selector) =>
140+
selector.type === 'PseudoClassSelector' || selector.type === 'PseudoElementSelector'
141+
)
142+
) {
137143
const first = node.selectors[0];
138144
node.metadata.is_global_like ||=
139145
(first.type === 'PseudoClassSelector' && first.name === 'host') ||

0 commit comments

Comments
 (0)