Skip to content

[css-view-transitions-2] Behavior of mismatching types between old and new document #9526

@noamr

Description

@noamr

As per #9523, both documents can specify "types" for the cross document view-transition, which affects the :active-view-transition selector.
Note that these types apply both at the old and new document, as they can affect (for example) which elements are captured.

When capturing the old document, only types specified on that document can apply.
On the new document, we can do one of the following:

  1. apply only types specified in the new document (override)
  2. apply both the types in the old and new documents (union)
  3. apply only the types that are in both documents (intersection)
  4. fail the transition if the types don't match

The current PR specified (1), the advantage being that it's the most flexible and least opinionated - if developers want to have different types in both documents they can do it, and if they want them to be strictly the same they can restrict it themselves, there is no technical reason to have this restriction or to force a union.

There are also advantages to the other approaches, perhaps mandating the same types would lead to design that is less error-prone.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions