:global
block produces invalid css for SelectorList
Regression from #15762
Fixes #15816
feat:
, fix:
, chore:
, or docs:
.packages/svelte/src
, add a changeset (npx changeset
).pnpm test
and lint the project with pnpm lint
Given a component like this
<style>
:global {
a, b {
color: red;
}
}
</style>
the generated css looks like this
/* :global {*/
/* (unused) a, b*/ {
color: red;
}
/*}*/
which is wrong because there's a block without a selector.
-
-
annoyance
This is probably a regression from #15762 since now here
even if we are in a global block we still modify the code because node.children.length
is greater than 1