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
.blue is considered used since the selector selects elements entirely within the snippet, but .veryblue .blue is not considered used because the selector crosses a snippet boundary.
While it would be nice to have this work, some kind of warning or error for this would be sufficient to prevent confusion since I imagine traversing snippets for combinator selector usage detection would be tricky.
This REPL demonstrates the issue. In the CSS output tab, the .veryblue .blue is commented out and marked as unused. Uncommenting the non-snippet .blue div results in that CSS rule being uncommented and applied to both .blue divs.
Logs
No response
System Info
N/A (REPL)
Severity
annoyance
The text was updated successfully, but these errors were encountered:
Describe the bug
Classes used within snippets do not contribute to the usage of combinator selectors. For example, in this component:
.blue
is considered used since the selector selects elements entirely within the snippet, but.veryblue .blue
is not considered used because the selector crosses a snippet boundary.While it would be nice to have this work, some kind of warning or error for this would be sufficient to prevent confusion since I imagine traversing snippets for combinator selector usage detection would be tricky.
Reproduction
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE4VQSw7CIBC9Co4bTcTuazXqNcRFLVNDRCBAmzSkdxf6WVQXzmZ4M-8zIUAtJDrIbwFU-UbI4WIM7MB3JgHXovQYsdONrdIkrJ0SxqAnD9ngZtszRWIVXLSkkqVzRwZpw-B0ja3I4uLEVMgmWeQztWC3aLtJMXqFs0XF0X4lrCj9E0MojRZzZHw530mcXPeJTsIIUlVaapsPIYdxOtw2cOebflWPsno9rW4Up5OBe3VLjyKbc-PHvTUXtUAOubcN9vf-A_0iueRzAQAA
This REPL demonstrates the issue. In the CSS output tab, the
.veryblue .blue
is commented out and marked as unused. Uncommenting the non-snippet.blue
div results in that CSS rule being uncommented and applied to both.blue
divs.Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: