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

[css-view-transitions-2] Tighten view-transition rule resolving #9602

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

noamr
Copy link
Collaborator

@noamr noamr commented Nov 15, 2023

  • types: none should resolve to having no types
  • navigation: none should always skip transition.

Closes #9534

- `types: none` should resolve to having no types
- `navigation: none` should always skip transition.

Closes w3c#9534
@noamr noamr requested review from khushalsagar and vmpstr and removed request for khushalsagar November 15, 2023 21:25
@@ -453,11 +453,19 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
<div algorithm>
To get the <dfn>resolve @view-transition rule</dfn> for a {{Document}} |document|:

1. Let |matchingRule| be the last ''@view-transition'' rule in |document| which has a ''@view-transition/navigation'' descriptor whose [=computed value=] is ''@view-transition/navigation/auto''.
1. Let |matchingRule| be the last ''@view-transition'' rule in |document|.
Copy link
Member

Choose a reason for hiding this comment

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

I tripped on this for a moment, figured we need to filter rules based on which ones apply to the navigation. But right now all rules would apply since its a binary opt-in.

Copy link
Member

Choose a reason for hiding this comment

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

I was wondering about the same thing. The only thing I'm not sure of is how "reloads" are skipped. Is that documented elsewhere in this spec?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right now we don't have to do any matching logic since there's just auto and none. Since none "always applies" (as per discussion on chat), and auto covers everything but reloads, they basically both always apply and we break the tie by picking the last one. In a reload it doesn't matter since there's currently no way to turn it on?

Once we break apart auto into more keywords and add reload this will need to be more involved.

The only thing I'm not sure of is how "reloads" are skipped. Is that documented elsewhere in this spec?

Here? Though that'll have to change once we add a reload type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes exactly

@noamr noamr merged commit 9ac9b46 into w3c:main Nov 17, 2023
1 check passed
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.

[css-view-transitions-2] resolve on descriptor/parameter names
4 participants