[@astrojs/svelte] passing class
to island component behaves differently from passing to static component
#5029
Labels
- P4: important
Violate documented behavior or significantly impacts performance (priority)
What version of
astro
are you using?1.4.6
Are you using an SSR adapter? If so, which one?
Vercel
What package manager are you using?
pnpm
What operating system are you using?
Mac
Describe the Bug
Passing a
class
prop from the outside into a Svelte component behaves differently if you assignclient:something
or not.If I assign
client:load
theclass
prop is erased from the component. I just see a small blink where the class is applied before it's been erased.How am I supposed to apply classes from a parent like that? Am I missing something?
Sidenote: I have encountered it applying margin via Tailwind classes but it is applicable to classes in general.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-x1aahc?file=src/pages/index.astro
It works in Preact: https://stackblitz.com/edit/github-yudtcj?file=src/components/Counter.tsx
Participation
The text was updated successfully, but these errors were encountered: