Repository navigation
Conversation
|
@0Miles is attempting to deploy a commit to the Aoyue Team on Vercel. A member of the Team first needs to authorize it. |
Layer 1 — element marking:
- view-transition-name and view-transition-class registered as
native rules
- <img class="view-transition-name:hero"> works directly
Layer 2 — pseudo-element selectors:
Five short-form aliases under config/selectors.ts:
- ::vt → ::view-transition
- ::vt-group → ::view-transition-group
- ::vt-image-pair → ::view-transition-image-pair
- ::vt-old → ::view-transition-old
- ::vt-new → ::view-transition-new
The (name) parameter sticks: opacity:0.5::vt-old(hero) →
::view-transition-old(hero){opacity:0.5}
Bonus parser fix in parse-selector: pre.lastIndexOf(':') for
::name(args) only stripped ONE colon, so ::view-transition-old(hero)
rendered as :view-transition-old(hero) (single colon → typed as
pseudo-class). Walk back through any leading consecutive colons so
the full prefix is captured.
Layer 3 (@view-transition at-rule) deferred — it's a document-level
declaration that doesn't fit the class-based model. Three design
options documented in css-docs/view-transitions-design.md, needs
maintainer choice.
- 10 test cases covering Layer 1 + parser fix + each Layer 2 alias
with parameter
- Real Chrome verification: rendered stylesheet contains proper
::view-transition-old(hero) selector with double colons; computed
viewTransitionName === "hero"
Closes master-co#265
0Miles
force-pushed
the
feat/265-view-transition-foundation
branch
from
April 30, 2026 19:05
63c9c79 to
7b2f097
Compare
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #265 (foundation + Layer 2). Layer 3 (`@view-transition` at-rule) deferred to a separate PR with maintainer design call.
Summary
Two layers of View Transitions API support:
Layer 1 — element marking
Layer 2 — pseudo-element selectors
Five short-form aliases under `config/selectors.ts`:
The `(name)` parameter sticks: `opacity:0.5::vt-old(hero)` produces `::view-transition-old(hero){opacity:0.5}`.
Bonus fix in parse-selector
Building Layer 2 surfaced a parser bug: `pre.lastIndexOf(':')` for `::name(args)` only stripped ONE colon, so `::view-transition-old(hero)` rendered as `:view-transition-old(hero)` (single colon → typed as pseudo-class). Walk back through any leading consecutive colons so the full prefix is captured.
Layer 3 — needs design call
`@view-transition { navigation: auto; }` is a document-level at-rule, not a class. Three options documented in `css-docs/view-transitions-design.md`:
I lean to (1) but it needs maintainer choice on schema + scope.
Testing