withastro/astro

Classes on islands don't work well

Closed this issue · 1 comments

What version of astro are you using?

2.2.1

Are you using an SSR adapter? If so, which one?

NOne

What package manager are you using?

npm

What operating system are you using?

Windows

What browser are you using?

Chrome

Describe the Bug

Developers can't use classes in as expected in islands. Since an island is rendered in as a child classes like odd:text-gray-500 or even:text-gray-500 don't work well. This can be solved using a directive.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-njm8rn?file=src/pages/index.astro

Participation

  • I am willing to submit a pull request for this issue.
bluwy commented

This is how Astro islands work fundamentally. If you think we can support a sort of host: directive to add props to the astro-island, the feature suggestion can be submitted to https://github.com/withastro/roadmap instead. Thanks!