Skip to content

[css-view-transitions-2] Reflecting view-transition-group in computed style #10638

@noamr

Description

@noamr

Folllow up on #10334

We defined a few rules on how view-transition-group is computed:

  • A few keywords (nearest/normal/contain)
  • Some rules that define whether a group is valid (e.g. has to refer to an ancestor view-transition-name)

We have all the information we need during style computation to compute a resolved view-transition-group, so hypothetically
getComputedStyle can already return the resolved group. It fits with other things that getComputedStyle does (colors, length, transforms etc). The other option is to resolve them when capturing

There are a few options:

  1. Style computation just passes things along to the view transition engine, reflecting the keywords and everything to getComputedStyle
  2. Style computation resolves the nearest/normal/contain keywords, but doesn't resolve rules that depend on the existence of view-transition-name.
  3. Style computation resolves everything and view-transition-group is always computed to be a valid ancestor view-transition-name.

I think (3) would be the most useful for developers and consistent with other things getComputedStyle does, but perhaps the overhead on style computation is unnecessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions