Open
Description
Describe the bug
App.svelte
<script>
import A from './A.svelte'
</script>
<A foo />
A.svelte
<script>
const {...rest} = $props()
</script>
<p {...rest} text-orange>
some text
</p>
<style>
[text-orange='']{
color: orange
}
</style>
The output is
<p foo='true' text-orange='true' /> some text </p>
Expected result is
<p foo text-orange> some text </p>
This makes me confused when I use svelte5 with UnoCSS Attributify mode.
Related issues
- Svelte needs attributify transformer just like
Attributify JSX transformer
unocss/unocss#4181 - Custom element boolean attribute incorrectly converted to
true
#10871
Reproduction
Logs
No response
System Info
System:
OS: macOS 15.0
CPU: (11) arm64 Apple M3 Pro
Memory: 96.31 MB / 36.00 GB
Shell: 3.7.1 - /opt/homebrew/bin/fish
Binaries:
Node: 20.16.0 - ~/.local/share/devbox/global/default/.devbox/nix/profile/default/bin/node
npm: 10.8.1 - ~/.local/share/devbox/global/default/.devbox/nix/profile/default/bin/npm
pnpm: 9.11.0 - ~/.local/share/devbox/global/default/.devbox/nix/profile/default/bin/pnpm
bun: 1.1.29 - ~/.local/share/aquaproj-aqua/bin/bun
Browsers:
Chrome: 129.0.6668.70
Safari: 18.0
npmPackages:
svelte: 5.0.0-next.259 => 5.0.0-next.259
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels