Skip to content

Commit

Permalink
while we're at it ..
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Oct 11, 2024
1 parent 3e7ddce commit 3d436d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
3 changes: 3 additions & 0 deletions packages/svelte/src/compiler/types/css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export namespace Css {
type: 'Rule';
prelude: SelectorList;
block: Block;
/** @internal */
metadata: {
parent_rule: null | Rule;
has_local_selectors: boolean;
Expand Down Expand Up @@ -60,6 +61,7 @@ export namespace Css {
* The `a`, `b` and `c` in `a b c {}`
*/
children: RelativeSelector[];
/** @internal */
metadata: {
rule: null | Rule;
/** True if this selector applies to an element. For global selectors, this is defined in css-analyze, for others in css-prune while scoping */
Expand All @@ -80,6 +82,7 @@ export namespace Css {
* The `b:is(...)` in `> b:is(...)`
*/
selectors: SimpleSelector[];
/** @internal */
metadata: {
/**
* `true` if the whole selector is unscoped, e.g. `:global(...)` or `:global` or `:global.x`.
Expand Down
23 changes: 0 additions & 23 deletions packages/svelte/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1299,14 +1299,6 @@ declare module 'svelte/compiler' {
type: 'Rule';
prelude: SelectorList;
block: Block;
metadata: {
parent_rule: null | Rule;
has_local_selectors: boolean;
/**
* `true` if the rule contains a `:global` selector, and therefore everything inside should be unscoped
*/
is_global_block: boolean;
};
}

/**
Expand All @@ -1329,11 +1321,6 @@ declare module 'svelte/compiler' {
* The `a`, `b` and `c` in `a b c {}`
*/
children: RelativeSelector[];
metadata: {
rule: null | Rule;
/** True if this selector applies to an element. For global selectors, this is defined in css-analyze, for others in css-prune while scoping */
used: boolean;
};
}

/**
Expand All @@ -1349,16 +1336,6 @@ declare module 'svelte/compiler' {
* The `b:is(...)` in `> b:is(...)`
*/
selectors: SimpleSelector[];
metadata: {
/**
* `true` if the whole selector is unscoped, e.g. `:global(...)` or `:global` or `:global.x`.
* Selectors like `:global(...).x` are not considered global, because they still need scoping.
*/
is_global: boolean;
/** `:root`, `:host`, `::view-transition`, or selectors after a `:global` */
is_global_like: boolean;
scoped: boolean;
};
}

export interface TypeSelector extends BaseNode {
Expand Down

0 comments on commit 3d436d6

Please sign in to comment.