File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/svelte/src/compiler/phases/2-analyze/css Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -224,12 +224,13 @@ const css_visitors = {
224
224
if ( ! parent_rule ) {
225
225
// https://developer.mozilla.org/en-US/docs/Web/CSS/Nesting_selector#using_outside_nested_rule
226
226
const children = rule . prelude . children ;
227
+ const selectors = children [ 0 ] . children [ 0 ] . selectors ;
227
228
if (
228
229
children . length > 1 ||
229
- children [ 0 ] . children [ 0 ] . selectors . length > 1 ||
230
- children [ 0 ] . children [ 0 ] . selectors [ 0 ] . type !== 'PseudoClassSelector' ||
231
- children [ 0 ] . children [ 0 ] . selectors [ 0 ] . name !== 'global' ||
232
- children [ 0 ] . children [ 0 ] . selectors [ 0 ] . args ?. children [ 0 ] ?. children [ 0 ] . selectors [ 0 ] !== node
230
+ selectors . length > 1 ||
231
+ selectors [ 0 ] . type !== 'PseudoClassSelector' ||
232
+ selectors [ 0 ] . name !== 'global' ||
233
+ selectors [ 0 ] . args ?. children [ 0 ] ?. children [ 0 ] . selectors [ 0 ] !== node
233
234
) {
234
235
e . css_nesting_selector_invalid_placement ( node ) ;
235
236
}
You can’t perform that action at this time.
0 commit comments