-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
svelte:element
buggy behaviour with class:foo
#7521
Comments
This is compiler bug and this is because of this PR. Already I fixed it up in my local but I would like to check for a similar issue is there or not. |
Oh Please reopen this.🙏 I mean #7486 introduced this bug and I will create new PR. |
My bad sorry |
Reproduction of this bug in the context of a SvelteKit app: https://stackblitz.com/edit/sveltekit-ef9nqu?file=src/routes/[bug].svelte |
If this is of any use, this bug also happens when the slot of the component is updated. The class disappears, although the value is correct: https://svelte.dev/repl/88605f45add6421da45265233c235edf?version=3.48.0 |
Describe the bug
Svelte is having buggy behavior with the new
svelte:element
. The advanced classes (class:foo
) do not properly work with props for some reason. I haven't narrowed down why, but I have created a REPL below.Reproduction
https://svelte.dev/repl/c74f48f8e55445c9b02734145bf78391?version=3.48.0
Workarounds
not using
class:foo
, and switching toclass="{foo ? 'foo' : ''}"
(at the cost of missing unused classes)System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: