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

fix: Allow global-like pseudo-selectors refinement #15313

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ccjmne
Copy link

@ccjmne ccjmne commented Feb 16, 2025

For instance, specifying a tree-structural pseudo-class to ::view-transition-new should still constitute a valid global-like selector.

Fixes #15312


This PR tweaked some tests, which wouldn't pass before but do now; however they're far from being exhaustive, as I'm sure this needs a little bit of thinking.

Secondly, this PR introduced a fix that's certainly way too broad in scope, additionally and "accidentally" allowing :host as well to be re-specified. Frankly, there may be quite a bit to discuss there.
Or we can start by having a specific exception for :only-child only, and solely for ::view-transition-new() and ::view-transition-old(), as at least these combinations seem to be legitimate.

pnpm test went fine; the linting one failed to run... but it's nearly midnight and I'm fairly confident my changes so far would pass.


Please don't hesitate to engage in the discussion, I'll happily tweak this preliminary commit and am well aware that it certainly isn't just right as of now :)

Copy link

changeset-bot bot commented Feb 16, 2025

🦋 Changeset detected

Latest commit: fdff04f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

For instance, specifying a tree-structural pseudo-class to
`::view-transition-new` should still constitute a valid global-like
selector.

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

Successfully merging this pull request may close these issues.

Appending tree-structural pseudo-classes to ::view-transition shouldn't compile to a scoped selector
1 participant