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

Merged
merged 2 commits into from
Mar 14, 2025

Conversation

ccjmne
Copy link
Contributor

@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: 7aeeeb0

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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
For instance, specifying a tree-structural pseudo-class to
`::view-transition-new` should still constitute a valid global-like
selector.

Fixes sveltejs#15312
Copy link
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@15313

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@svelte-docs-bot
Copy link

@dummdidumm dummdidumm merged commit f227cfc into sveltejs:main Mar 14, 2025
9 checks passed
@github-actions github-actions bot mentioned this pull request Mar 14, 2025
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
2 participants