style: Use auto as the initial value for view-timeline-inset

Per the proposal in https://github.com/w3c/csswg-drafts/issues/7747,
we change view-timeline-inset to have an initial value of auto.

Differential Revision: https://phabricator.services.mozilla.com/D173487
This commit is contained in:
Boris Chiou 2023-03-24 19:16:42 +00:00 committed by Martin Robinson
parent 6db3b1158c
commit a5f696b90d
3 changed files with 10 additions and 14 deletions

View file

@ -386,7 +386,7 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"view-timeline-inset",
"ViewTimelineInset",
"computed::ViewTimelineInset::zero()",
"computed::ViewTimelineInset::default()",
vector=True,
need_index=True,
engines="gecko",

View file

@ -23,16 +23,3 @@ 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(),
}
}
}

View file

@ -169,3 +169,12 @@ where
Ok(())
}
}
impl<LengthPercent> Default for ViewTimelineInset<LengthPercent> {
fn default() -> Self {
Self {
start: GenericLengthPercentageOrAuto::auto(),
end: GenericLengthPercentageOrAuto::auto(),
}
}
}