Skip to content

[css-view-transitions-2] resolve on descriptor/parameter names #9534

Description

@noamr

The current editor's draft defines a few new names.
We should resolve whether they're the right names or should be changed.

Current spec:

/* css */
@view-transition {
  navigation: auto | none;
  type: foo bar;  
}

:root:active-view-transition(foo) {
  img.hero {
    view-transition-name: hero;
  }
}
/* js */
document.startViewTransition({
  update: () => { ... },
  type: ["foo", "bar"]
});

viewTransitionRule.type // DOMTokenList

Proposed Resolution

  • The navigation-type descriptor is navigation, and its current possible values are auto and none.
  • The type descriptor is type. Its default value is an empty list. There is no none value or so.
  • The JS parameter for startViewTransition as well as the property name in the CSSOM rule can be typeList, to be consistent with classList, as it receives some sort of iterable. Alternatively we can keep it as type or use types.
  • Bonus: decide whether the types can be regular idents vs. using dashed-idents for future compatibility with keywords.

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