-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
awaiting submitterneeds a reproduction, or clarificationneeds a reproduction, or clarificationcssStuff related to Svelte's built-in CSS handlingStuff related to Svelte's built-in CSS handling
Description
Describe the bug
I think we should relax the CSS verification for attributes
In my code I had to add data-active={false as true} to not trigger the first CSS selector
Then I added the second CSS selector, but this one is not correctly picked up
Reproduction
<script lang="ts">
//
</script>
<div class="floating-menu" data-active={false as true}>
<div class="command-menu-tooltip"></div>
</div>
<style>
/* This one is correctly picked up */
.floating-menu[data-active='true'] > .command-menu-tooltip {
background-color: red;
}
/* This one is not */
.floating-menu[data-active='true'] {
background-color: red;
}
</style>Logs
No response
System Info
System:
OS: macOS 14.2.1
CPU: (12) arm64 Apple M3 Pro
Memory: 71.31 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.10.0 - ~/.nvm/versions/node/v22.10.0/bin/node
npm: 10.9.0 - ~/.nvm/versions/node/v22.10.0/bin/npm
Browsers:
Chrome: 130.0.6723.93
Safari: 17.2.1
npmPackages:
svelte: ^5.1.12 => 5.1.12Severity
annoyance
Metadata
Metadata
Assignees
Labels
awaiting submitterneeds a reproduction, or clarificationneeds a reproduction, or clarificationcssStuff related to Svelte's built-in CSS handlingStuff related to Svelte's built-in CSS handling