@@ -1315,30 +1315,57 @@ declare module 'svelte/compiler' {
1315
1315
metadata : {
1316
1316
parent_rule : null | Rule ;
1317
1317
has_local_selectors : boolean ;
1318
+ /**
1319
+ * `true` if the rule contains a `:global` selector, and therefore everything inside should be unscoped
1320
+ */
1318
1321
is_global_block : boolean ;
1319
1322
} ;
1320
1323
}
1321
1324
1325
+ /**
1326
+ * A list of selectors, e.g. `a, b, c {}`
1327
+ */
1322
1328
export interface SelectorList extends BaseNode {
1323
1329
type : 'SelectorList' ;
1330
+ /**
1331
+ * The `a`, `b` and `c` in `a, b, c {}`
1332
+ */
1324
1333
children : ComplexSelector [ ] ;
1325
1334
}
1326
1335
1336
+ /**
1337
+ * A complex selector, e.g. `a b c {}`
1338
+ */
1327
1339
export interface ComplexSelector extends BaseNode {
1328
1340
type : 'ComplexSelector' ;
1341
+ /**
1342
+ * The `a`, `b` and `c` in `a b c {}`
1343
+ */
1329
1344
children : RelativeSelector [ ] ;
1330
1345
metadata : {
1331
1346
rule : null | Rule ;
1332
1347
used : boolean ;
1333
1348
} ;
1334
1349
}
1335
1350
1351
+ /**
1352
+ * A relative selector, e.g the `a` and `> b` in `a > b {}`
1353
+ */
1336
1354
export interface RelativeSelector extends BaseNode {
1337
1355
type : 'RelativeSelector' ;
1356
+ /**
1357
+ * In `a > b`, `> b` forms one relative selector, and `>` is the combinator. `null` for the first selector.
1358
+ */
1338
1359
combinator : null | Combinator ;
1360
+ /**
1361
+ * The `b:is(...)` in `> b:is(...)`
1362
+ */
1339
1363
selectors : SimpleSelector [ ] ;
1340
1364
metadata : {
1341
- /** `:global(...)` or `:global` or `:global.x` (but not `.x:global`) */
1365
+ /**
1366
+ * `true` if the whole selector is unscoped, e.g. `:global(...)` or `:global` or `:global.x`.
1367
+ * Selectors like `:global(...).x` or `div:global` are not considered global, because they still need scoping.
1368
+ */
1342
1369
is_global : boolean ;
1343
1370
/** `:root`, `:host`, `::view-transition`, or selectors after a `:global` */
1344
1371
is_global_like : boolean ;
0 commit comments