@@ -683,94 +683,6 @@ offset=] and its [=effective end offset=] to be non-null. This means that for
683
683
example if one uses an element-based offset whose {{target}} is not a descendant
684
684
of the scroll timeline {{source}} , the timeline remains inactive.
685
685
686
- ## The 'animation-timeline' property ## {#animation-timeline}
687
-
688
- A {{ScrollTimeline}} may be applied to a CSS Animation [[CSS3-ANIMATIONS]] using
689
- either the 'animation-timeline' property or 'animation-name' property. With the
690
- former taking precedent over the latter.
691
-
692
- <pre class='propdef'>
693
- Name : animation-timeline
694
- Value : <<single-animation-timeline>>#
695
- Initial : auto
696
- Applies to : all elements, ::before and ::after pseudo-elements
697
- Inherited : no
698
- Animatable : no
699
- Percentages : N/A
700
- Media : interactive
701
- Computed value : As specified
702
- Canonical order : per grammar
703
- </pre>
704
-
705
- <pre>
706
- <dfn><single-animation-timeline></dfn> = auto | none | <<timeline-name>>
707
- </pre>
708
-
709
- The 'animation-timeline' property is similar to properties like
710
- 'animation-name' and 'animation-duration' in that it can have one or
711
- more values, each one imparting additional behavior to a corresponding
712
- [=animation=] on the element, with the timelines matched up with animations as
713
- described [[css-animations-1#animation-name|here]] .
714
-
715
- Each value has type <<single-animation-timeline>> , whose possible values have
716
- the following effects:
717
-
718
- : auto
719
- :: The animation's [=timeline=] is a {{DocumentTimeline}} , more specifically
720
- the <a>default document timeline</a> .
721
-
722
- : none
723
- :: The animation is not associated with a [=timeline=] .
724
-
725
-
726
- : <<timeline-name>>
727
- :: If ''@scroll-timeline'' rule with the name specified by <<timeline-name>> , then
728
- the animation's [=timeline=] is a timeline whose property values are
729
- provided by that rule. Otherwise there is no [=timeline=] associated with
730
- the animation.
731
-
732
-
733
- If 'animation-timeline' property is not specified but 'animation-name' is
734
- specified then its value is used to select the scroll-timeline at-rule that
735
- provides the property values for the animation's timeline.
736
-
737
- Note: Allowing animation-name to be used for selecting timeline enables most
738
- common animations to have to use a single name for both their keyframes and
739
- timeline which is simple and ergonomics. The 'animation-timeline' property gives
740
- additional control to authors to independently select keyframes and timeline if
741
- necessary.
742
-
743
-
744
- In this case, each possible value of type <<keyframes-name>> from
745
- 'animation-name' has the following effects:
746
-
747
- : none
748
- :: No timelines and keyframes are specified at all, so there will be no
749
- animation. Any other animations properties specified for this animation have no
750
- effect.
751
-
752
-
753
- : <<keyframes-name>>
754
- :: If ''@scroll-timeline'' rule with the name specified by <<keyframes-name>> , then
755
- the animation's [=timeline=] is a timeline whose property values are
756
- provided by that rule. Otherwise the animation's [=timeline=] is a
757
- {{DocumentTimeline}} , more specifically the <a>default document
758
- timeline</a> .
759
-
760
- Note: Notice that the behavior for the case where no timeline with the given
761
- name is found is different for these two properties. This ensures backward
762
- compatibility because all existing time-based animations with 'animation-name'
763
- specified expect to use <a>default document timeline</a> .
764
-
765
- ### Changes to the 'animation' shorthand property ### {#animation-shorthand}
766
-
767
- The 'animation' shorthand property syntax is updated to accept an additional
768
- optional <<timeline-name>> .
769
-
770
- <dfn><single-animation></dfn> = <<time>> || <<easing-function>> || <<time>> || <<single-animation-iteration-count>> || <<single-animation-direction>> || <<single-animation-fill-mode>> || <<single-animation-play-state>> || [ none | <<keyframes-name>> ] || [ none | <<timeline-name>> ]
771
-
772
- Issue: Update css-animations spec instead of monkey-patching it here.
773
-
774
686
## The '@scroll-timeline' at-rule ## {#scroll-timeline-at-rule}
775
687
776
688
[=Scroll Timelines=] are specified in CSS using the <dfn>@scroll-timeline</dfn>
@@ -779,18 +691,17 @@ at-rule, defined as follows:
779
691
<pre>
780
692
@scroll-timeline = @scroll-timeline <<timeline-name>> { <<declaration-list>> }
781
693
782
-
783
- <dfn><timeline-name></dfn> = <<custom-ident>> | <<string>>
784
694
</pre>
785
695
786
-
787
696
An ''@scroll-timeline'' rule has a name given by the <<custom-ident>> or <<string>> in
788
697
its prelude. The two syntaxes are equivalent in functionality; the name is the
789
698
value of the ident or string. As normal for <<custom-ident>> s and <<string>> s,
790
699
the names are fully case-sensitive; two names are equal only if they are
791
700
codepoint-by-codepoint equal. The <<custom-ident>> additionally excludes the
792
701
none keyword.
793
702
703
+ Once specified, a scroll timeline may be associated with a CSS Animation
704
+ [[CSS3-ANIMATIONS]] by using the 'animation-timeline' property.
794
705
795
706
The <<declaration-list>> inside of ''@scroll-timeline'' rule can only contain the
796
707
descriptors defined in this section.
0 commit comments