mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
style: Support view-timeline-inset in style system
Support view-timeline-inset: `[ [ auto | <length-percentage> ]{1,2} ]#`. And its initial value is 0. Differential Revision: https://phabricator.services.mozilla.com/D166243
This commit is contained in:
parent
b5b64af3f1
commit
835268aec2
8 changed files with 102 additions and 8 deletions
|
@ -104,7 +104,7 @@ pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
|
|||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||
#[cfg(feature = "gecko")]
|
||||
pub use self::ui::CursorImage;
|
||||
pub use self::ui::{BoolInteger, Cursor, UserSelect};
|
||||
pub use self::ui::{BoolInteger, Cursor, UserSelect, ViewTimelineInset};
|
||||
pub use super::specified::TextTransform;
|
||||
pub use super::specified::ViewportVariant;
|
||||
pub use super::specified::{BorderStyle, TextDecorationLine};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
use crate::values::computed::color::Color;
|
||||
use crate::values::computed::image::Image;
|
||||
use crate::values::computed::Number;
|
||||
use crate::values::computed::{LengthPercentage, Number};
|
||||
use crate::values::generics::ui as generics;
|
||||
|
||||
pub use crate::values::specified::ui::CursorKind;
|
||||
|
@ -20,3 +20,19 @@ pub type CursorImage = generics::GenericCursorImage<Image, Number>;
|
|||
|
||||
/// A computed value for `scrollbar-color` property.
|
||||
pub type ScrollbarColor = generics::GenericScrollbarColor<Color>;
|
||||
|
||||
/// A computed value for the `view-timeline-inset` property.
|
||||
pub type ViewTimelineInset = generics::GenericViewTimelineInset<LengthPercentage>;
|
||||
|
||||
impl ViewTimelineInset {
|
||||
/// Returns the initial value, `0`.
|
||||
#[inline]
|
||||
pub fn zero() -> Self {
|
||||
use crate::Zero;
|
||||
|
||||
Self {
|
||||
start: Zero::zero(),
|
||||
end: Zero::zero(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue