From 2bbc2d7c29853cf8ff9da69d8ddc03af15f2ca75 Mon Sep 17 00:00:00 2001
From: andruud
@@ -980,6 +983,9 @@ spec:selectors-4; type:dfn; text:selector
Specifies names for the [=named view progress timelines=]
associated with this element.
+ Makes this element a [=weak timeline scope=]
+ for the specified names.
+
### Axis of a View Progress Timeline: the 'view-timeline-axis' property ### {#view-timeline-axis}
@@ -1096,19 +1102,16 @@ spec:selectors-4; type:dfn; text:selector
any real use cases for multiple iterations here.
## Named Timeline Scoping and Lookup ## {#timeline-scoping}
+
+ Named [=scroll progress timelines=] and [=view progress timelines=]
+ are referenceable within the subtree of a [=timeline scope=],
+ with the [=document element=] itself acting as an implicit default scope.
- A named [=scroll progress timeline=] or [=view progress timeline=]
- is referenceable by:
- * the name-declaring element itself
- * that element’s descendants
-
- Note: The 'timeline-scope' property can be used
- to declare the name of a timeline on an ancestor of its defining element,
- effectively expanding its scope beyond that element’s subtree.
+ When there are multiple competing definitions
+ for the same name within the subtree of a [=timeline scope=],
+ the definition provided by the last element in [=flat tree=] order
+ takes precedence.
- If multiple elements have declared the same timeline name,
- the matching timeline is the one declared
- on the nearest element in tree order.
In case of a name conflict on the same element,
names declared later in the naming property
('scroll-timeline-name', 'view-timeline-name')
@@ -1116,42 +1119,69 @@ spec:selectors-4; type:dfn; text:selector
[=scroll progress timelines=] take precedence over [=view progress timelines=].
Name: timeline-scope
@@ -1673,50 +1707,111 @@ spec:selectors-4; type:dfn; text:selector
Initial: none
Applies to: all elements
Inherited: no
- Computed value: the keyword ''timeline-scope/none'' or a list of [=CSS identifiers=]
+ Computed value: the keyword ''timeline-scope/none'',
+ the keyword ''timeline-scope/all'',
+ or a list of [=CSS identifiers=]
Animation type: not animatable
- This property declares the scope of the specified timeline names
- to extend across this element’s subtree.
- This allows a named timeline
- (such as a [=named scroll progress timeline=] or [=named view progress timeline=])
- to be referenced by elements outside the timeline-defining element’s subtree--
- for example, by siblings, cousins, or ancestors.
- It also blocks descendant timelines with the specified names
- from being referenced from outside this subtree,
- and ancestor timelines with the specified names from being referenced
- within this subtree.
-
- ISSUE(8915): There's some open discussion about these blocking effects.
-
Values have the following meanings:
+
+ A timeline scope is an element which limits the visibility
+ of named timelines within the inclusive [=flat tree=] descendants of that element.
+ A reference to a named timeline
+ from an element within the subtree of a [=timeline scope=]
+ can only find timeline definitions provided by elements in the same subtree.
- If no such timeline exists,
- or if more than one such timeline exists,
- instead declares an [=inactive timeline=] with the specified name.
+ Elements that are [=timeline scopes=]
+ can either be [=strong timeline scopes=],
+ or [=weak timeline scopes=]:
+
+
+
- Note: This property cannot affect or invalidate any timeline name lookups
- within the subtree of a descendant element that declares the same name.
- See [[#timeline-scope]].
+ When an element is both a [=strong timeline scope=]
+ and a [=weak timeline scope=] for the same name,
+ it behaves like a [=strong timeline scope=] for that name.
# Changes # {#changes}
@@ -1724,6 +1819,9 @@ spec:selectors-4; type:dfn; text:selector
(28 April 2023)
Working Draft include:
+ * Changed timeline name scoping to use nearest-ancestor and last-in-tree-order resolution.
+ (Issue 12581),
+ (Issue 13364)
* Allow ''all'' as a value for 'timeline-scope'.
(Issue 9158)
* Removed