← Back to release summary

trigger-scope

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

WPT details: https://wpt.fyi/results/?label=master&label=experimental&aligned&q=trigger-scope (As of this writing, only the parsing tests are present on the dashboard but functional tests[1] are quickly following) [1] https://github.com/web-platform-tests/wpt/pull/56601

Summary

trigger-scope gives authors the ability to limit the names of animation triggers declared by trigger-instantiating properties. Trigger-Instantiating properties, such as timeline-trigger, declare names which can be referenced by the animation-trigger property in order to attach animations to triggers. However, these names are global by default (similar to anchor-name) and it is often useful for author to limit the visibility of the names so as to isolate animation-to-trigger interactions.

Motivation

Similar to anchor-scope[1], trigger-instantiating properties need a mechanism for limiting the visibility of the names declared by the trigger-instantiating property. [1] https://drafts.csswg.org/css-anchor-position-1/#anchor-scope

Standards & signals

Ecosystem

Explainers: https://github.com/explainers-by-googlers/scroll-triggered-animations/blob/main/TRIGGER_SCOPE.md

View on chromestatus.com