Skip to content
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

bug: ::slotted(...) selector not working after SSR hydration in scoped: true component #6081

Open
3 tasks done
johnjenkins opened this issue Dec 17, 2024 · 0 comments
Open
3 tasks done

Comments

@johnjenkins
Copy link
Contributor

johnjenkins commented Dec 17, 2024

Prerequisites

Stencil Version

latest

Current Behavior

::slotted(...) selectors in scoped: true components are not working properly due to the css selector not having enough specificity.

image

This is due to a regression added via the recent client-hydrate re-write which incorrectly applies the internal / scoped className to the slotted elements *edit this has been true for a while in Stencil

image

Expected Behavior

slotted selectors should be applied to slotted nodes

System Info

No response

Steps to Reproduce

Open https://stackblitz.com/edit/stencil-start-ydmeww :

npm run build && npm run express

In the preview window, click on 'non-shadow-css-slotted'.

Notice the slotted node has the wrong colour.

Code Reproduction URL

https://stackblitz.com/edit/stencil-start-ydmeww

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants