style: Cleanup a bit the scroll-snap-type properties.

Still not perfect, but at least a bit more consistent.
This commit is contained in:
Emilio Cobos Álvarez 2017-10-25 20:12:37 +02:00
parent 05beeee268
commit 328f142f38
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 24 additions and 20 deletions

View file

@ -9,7 +9,7 @@ use values::computed::length::LengthOrPercentage;
use values::generics::box_::AnimationIterationCount as GenericAnimationIterationCount;
use values::generics::box_::VerticalAlign as GenericVerticalAlign;
pub use values::specified::box_::AnimationName;
pub use values::specified::box_::{AnimationName, ScrollSnapType};
/// A computed value for the `vertical-align` property.
pub type VerticalAlign = GenericVerticalAlign<LengthOrPercentage>;

View file

@ -36,7 +36,7 @@ pub use self::angle::Angle;
pub use self::background::{BackgroundSize, BackgroundRepeat};
pub use self::border::{BorderImageSlice, BorderImageWidth, BorderImageSideWidth};
pub use self::border::{BorderRadius, BorderCornerRadius, BorderSpacing};
pub use self::box_::{AnimationIterationCount, AnimationName, VerticalAlign};
pub use self::box_::{AnimationIterationCount, AnimationName, ScrollSnapType, VerticalAlign};
pub use self::color::{Color, ColorPropertyValue, RGBAColor};
pub use self::effects::{BoxShadow, Filter, SimpleShadow};
pub use self::flex::FlexBasis;

View file

@ -110,3 +110,10 @@ impl Parse for AnimationName {
Ok(AnimationName(None))
}
}
define_css_keyword_enum! { ScrollSnapType:
"none" => None,
"mandatory" => Mandatory,
"proximity" => Proximity,
}
add_impls_for_keyword_enum!(ScrollSnapType);

View file

@ -30,7 +30,7 @@ pub use self::align::{AlignItems, AlignJustifyContent, AlignJustifySelf, Justify
pub use self::background::{BackgroundRepeat, BackgroundSize};
pub use self::border::{BorderCornerRadius, BorderImageSlice, BorderImageWidth};
pub use self::border::{BorderImageSideWidth, BorderRadius, BorderSideWidth, BorderSpacing};
pub use self::box_::{AnimationIterationCount, AnimationName, VerticalAlign};
pub use self::box_::{AnimationIterationCount, AnimationName, ScrollSnapType, VerticalAlign};
pub use self::color::{Color, ColorPropertyValue, RGBAColor};
pub use self::effects::{BoxShadow, Filter, SimpleShadow};
pub use self::flex::FlexBasis;