You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<divclass="item">I am displayed in <code>color: rebeccapurple</code>
because the <code>special</code> layer comes after the <code>base</code> layer.
My green border, font-size, and padding come from the <code>base</code> layer.</div><style>
@layer base, special;
@layer special {
.item {
color: rebeccapurple;
}
}
@layer base {
.item {
color: green;
border: 5px solid green;
font-size: 1.3em;
padding: .5em;
}
}
</style>
Describe the bug
Using CSS cascade layers in a Svelte component results in the styles inside the layer being stripped from the final output without warning.
Reproduction
REPL
Component:
Compiled style:
Wrapping the selectors in
:global
includes them in the final output, but then the styles are not scoped.(Code taken from an example on MDN)
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: