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
What version of
astroare 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-slotelement is created which interferes with styling of content within nativeslotelements.When looking at the example
MyCardelements, the first two don't get the correct css styling. Theh1should behotpinkand the footer text should begray.The added
<astro-slot><h1>...</h1></astro-slot>element interferes with the styling, because the::slottedselector only supports compound top-level selectors: https://developer.mozilla.org/en-US/docs/Web/CSS/::slottedThere are also some render issues. I also tried the
is:rawdirective, 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