← Back to release summary

View Transitions: shadowRoots option in startViewTransition()

Category
CSS
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Adds a `shadowRoots` sequence to `StartViewTransitionOptions` (defaulting to `[]`). This allows `document.startViewTransition()` and `element.startViewTransition()` to discover participating elements (`view-transition-name`, `view-transition-class`, and `view-transition-group`) inside specified descendant `ShadowRoot`s while preserving shadow DOM encapsulation.

Motivation

View transition names are tree-scoped, so transitions started on a document or element cannot discover `view-transition-name` declarations inside shadow trees. Authors currently have to work around this using `::part()` or moving styling out of the shadow tree, which breaks encapsulation or prevents animating shadow internals alongside slotted light DOM content.

Standards & signals

Ecosystem

Explainers: https://github.com/w3c/csswg-drafts/issues/12953

View on chromestatus.com