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
However, Svelte outputs CSS that works differently across these cases. It works correctly for the first one by applying special scoping classes to .tint, but it doesn't with the second one. (See the CSS output tab of the REPL.)
This means that any.tint that has a hovered parent will get the styling that was only supposed to apply to one component. That's a problem.
Mmm i think I know what's going on...I have a PR open that will not fix this issue but I think it's needed before fixing this. I'll take a look later or tomorrow
Describe the bug
Say I have an element in a component that needs to depend on its parent's state. I might write something like this:
Now let's say I want to also account for focus. To prevent repetition, I might nest my styles:
However, Svelte outputs CSS that works differently across these cases. It works correctly for the first one by applying special scoping classes to
.tint
, but it doesn't with the second one. (See the CSS output tab of the REPL.)This means that any
.tint
that has a hovered parent will get the styling that was only supposed to apply to one component. That's a problem.Reproduction
https://svelte.dev/playground/fe63a82ba4da46799977fcbca797adfc?version=5.9.0
Logs
No response
System Info
N/A (using the REPL in Firefox 133.0 (64-bit) on Fedora Workstation 40)
Severity
annoyance
The text was updated successfully, but these errors were encountered: