Open
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
?