Skip to content

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 :)

@changeset-bot
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

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

Fixes sveltejs#15312
@github-actions
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