mirror of
https://github.com/servo/servo.git
synced 2025-10-16 16:29:18 +01:00
style: Add animation-timeline: view() in style system
Support view() notation for animation-timeline: `<view()> = view( [ <axis> || <'view-timeline-inset'> ]? )` We move AnimationTimeline and its related types into the generics folder, and define two new structs for scroll() and view(). Note: 1. The syntax of scroll() doesn't match the current version of the spec. I will update it in Bug 1814444. 2. We will handle the creation/usage of the Anonymous View Progress Timelines in the next patch. Differential Revision: https://phabricator.services.mozilla.com/D173904
This commit is contained in:
parent
115a45f8eb
commit
9fd6f09a41
3 changed files with 184 additions and 51 deletions
|
@ -11,7 +11,7 @@ use std::fmt::{self, Write};
|
|||
use style_traits::{CssWriter, ToCss};
|
||||
|
||||
pub use crate::values::specified::animation::{
|
||||
AnimationName, AnimationTimeline, ScrollAxis, ScrollTimelineName, TransitionProperty,
|
||||
AnimationName, ScrollAxis, ScrollTimelineName, TransitionProperty,
|
||||
};
|
||||
|
||||
/// A computed value for the `animation-iteration-count` property.
|
||||
|
@ -62,5 +62,8 @@ impl ToCss for AnimationIterationCount {
|
|||
}
|
||||
}
|
||||
|
||||
/// A computed value for the `animation-timeline` property.
|
||||
pub type AnimationTimeline = generics::GenericAnimationTimeline<LengthPercentage>;
|
||||
|
||||
/// A computed value for the `view-timeline-inset` property.
|
||||
pub type ViewTimelineInset = generics::GenericViewTimelineInset<LengthPercentage>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue