Skip to content

Commit 91d02cc

Browse files
authored
fix: correctly scope CSS selectors with descendant combinators (#10502)
* fix traversal, but break some other stuff * man this is fucken hard * fixes * getting closer * be conservative for now * tidy * invert * invert * simplify * switch * for now * progress * i think it works? * fix * tidy up * revert some stuff * remove some junk * handle weird cases * update * tweak * shrink * changeset --------- Co-authored-by: Rich Harris <[email protected]>
1 parent b1fb7ac commit 91d02cc

File tree

27 files changed

+170
-167
lines changed

27 files changed

+170
-167
lines changed

.changeset/beige-mirrors-listen.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: correctly scope CSS selectors with descendant combinators

packages/svelte/src/compiler/phases/1-parse/read/style.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ function read_rule(parser) {
114114
start,
115115
end: parser.index,
116116
metadata: {
117-
parent_rule: null
117+
parent_rule: null,
118+
has_local_selectors: false
118119
}
119120
};
120121
}

0 commit comments

Comments
 (0)