-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix: CSS adjacent and general sibling combinator treats slots as if they don't exist #8422
Conversation
@ngtr6788 is attempting to deploy a commit to the Svelte Team on Vercel. A member of the Team first needs to authorize it. |
I'm not 100% sure if we want to always do this. In the case of custom elements this element actually exists. |
Interesting! I am not aware of nor am familiar with web components before. Do you know what the expected behaviour would be? For example, from the bug report,
does [EDIT:] |
Fixes #8284.
The problem is that the
<slot>
element is treated as an actual element, and for this purpose, we have to treat them as if they don't exist. More specifically, we treat all slot fallback children nodes on the same level as the slot's non-slot siblings.[edit: I wasn't aware of the
<slot>
element in web components before, so I added a check that if the node belongs to a web component, we still treat slots as if they exist.]Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests
npm test
and lint the project withnpm run lint