-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
What version of astro
are you using?
1.16.11
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, Linux
Describe the Bug
When using a client directive or the Class constructor for Lit Web Components an extraneous astro-slot
element is created which interferes with styling of content within native slot
elements.
When looking at the example MyCard
elements, the first two don't get the correct css styling. The h1
should be hotpink
and the footer text should be gray
.
The added <astro-slot><h1>...</h1></astro-slot>
element interferes with the styling, because the ::slotted
selector only supports compound top-level selectors: https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted
There are also some render issues. I also tried the is:raw
directive, but that doesn't seem to make a difference.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-wqbjru?file=src/components/my-card.ts
Participation
- I am willing to submit a pull request for this issue.