Skip to content

Commit 7c9b11d

Browse files
committed
tidy up
1 parent c9a79f0 commit 7c9b11d

File tree

1 file changed

+1
-6
lines changed
  • packages/svelte/src/compiler/phases/2-analyze/css

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ function apply_selector(relative_selectors, rule, element, stylesheet) {
141141
case '>': {
142142
let parent = /** @type {import('#compiler').TemplateNode | null} */ (element.parent);
143143

144-
let parent_found = false;
145144
let parent_matched = false;
146145
let crossed_component_boundary = false;
147146

@@ -151,14 +150,10 @@ function apply_selector(relative_selectors, rule, element, stylesheet) {
151150
}
152151

153152
if (parent.type === 'RegularElement' || parent.type === 'SvelteElement') {
154-
parent_found = true;
155-
156153
if (apply_selector(parent_selectors, rule, parent, stylesheet)) {
154+
// TODO the `name === ' '` causes false positives, but removing it causes false negatives...
157155
if (name === ' ' || crossed_component_boundary) {
158156
mark(parent_selectors[parent_selectors.length - 1], parent);
159-
} else {
160-
parent.metadata.scoped = true;
161-
// parent_selectors[parent_selectors.length - 1].metadata.selected.add(parent);
162157
}
163158

164159
parent_matched = true;

0 commit comments

Comments
 (0)