[css-view-transitions-2] @view-transition resolution algorithm should cascade
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
The @view-transition resolution algorithm is currently specifies:
To get the resolve @view-transition rule for a Document document:
- Let matchingRule be the last @view-transition rule in document which has a navigation descriptor whose computed value is auto.
- If matchingRule is not found, then return "not found".
- Return a list of strings corresponding to that descriptor’s computed value.
But I think it needs to account for the CSS cascade. Take this example:
<style>
@view-transition {
navigation: auto;
type: foo;
}
@import url('style.css') layer(A);
</style>
/*style.css*/
@view-transition {
navigation: auto;
type: bar;
}
I would expect the foo transition to be resolved, despite the fact that the bar transition is "last".
I think the way to do this will be to keep a map of all encountered @view-transition rules, keyed by their matcher descriptors (currently just navigation but later including from, to, etc. with succeeding levels of the cascade overriding a entries where the matchers are equal.
While we're here:
Return a list of strings corresponding to that descriptor’s computed value.
I'm assuming "that descriptor" is navigation?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CSS View Transitions 2 section on resolving the @view-transition rule and compare its current last-rule behavior with the CSS cascade example in the issue. Clarify whether the descriptor is navigation, then update the algorithm so the documented result matches the intended cascade semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100