mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Hook named scroll timelines to animation-timeline
Basically, animation-timeline could be 1. auto 2. none 3. <timeline-name> We extend the <timeline-name> to cover both @scroll-timeline rule and scroll-timeline-name property. We check @scroll-timeline rule first. If it doesn't exist, we check scroll-timeline-name of the element itself, the previous silbings, and their ancestors. Differential Revision: https://phabricator.services.mozilla.com/D146358
This commit is contained in:
parent
13acff77d1
commit
82d7f2154d
1 changed files with 6 additions and 2 deletions
|
@ -815,9 +815,13 @@ fn is_default<T: Default + PartialEq>(value: &T) -> bool {
|
|||
pub enum AnimationTimeline {
|
||||
/// Use default timeline. The animation’s timeline is a DocumentTimeline.
|
||||
Auto,
|
||||
/// The scroll-timeline name
|
||||
/// The scroll-timeline name.
|
||||
///
|
||||
/// Note: This could be the timeline name from @scroll-timeline rule, or scroll-timeline-name
|
||||
/// from itself, its ancestors, or its previous siblings.
|
||||
/// https://drafts.csswg.org/scroll-animations-1/rewrite#scroll-timelines-named
|
||||
Timeline(TimelineName),
|
||||
/// The scroll() notation
|
||||
/// The scroll() notation.
|
||||
/// https://drafts.csswg.org/scroll-animations-1/rewrite#scroll-notation
|
||||
#[css(function)]
|
||||
Scroll(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue