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 appropriately in scoped: true component #6081

Closed
3 tasks done
johnjenkins opened this issue Dec 17, 2024 · 0 comments · Fixed by #6082
Closed
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

@ionitron-bot ionitron-bot bot added the triage label Dec 17, 2024
@johnjenkins johnjenkins changed the title bug: ::slotted(...) selector not working after SSR hydration in scoped: true component bug: ::slotted(...) selector not working appropriately in scoped: true component Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants