mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +01:00
Add LengthOrNormal type aliases
This commit is contained in:
parent
e5f995e7c4
commit
731706041d
2 changed files with 6 additions and 2 deletions
|
@ -7,7 +7,7 @@ use ordered_float::NotNaN;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use style_traits::ToCss;
|
use style_traits::ToCss;
|
||||||
use super::{Number, ToComputedValue, Context};
|
use super::{Number, ToComputedValue, Context};
|
||||||
use values::{Auto, CSSFloat, Either, None_, specified};
|
use values::{Auto, CSSFloat, Either, None_, Normal, specified};
|
||||||
|
|
||||||
pub use cssparser::Color as CSSColor;
|
pub use cssparser::Color as CSSColor;
|
||||||
pub use super::image::{EndingShape as GradientShape, Gradient, GradientKind, Image};
|
pub use super::image::{EndingShape as GradientShape, Gradient, GradientKind, Image};
|
||||||
|
@ -475,4 +475,6 @@ pub type LengthOrAuto = Either<Length, Auto>;
|
||||||
|
|
||||||
pub type LengthOrNumber = Either<Length, Number>;
|
pub type LengthOrNumber = Either<Length, Number>;
|
||||||
|
|
||||||
|
pub type LengthOrNormal = Either<Length, Normal>;
|
||||||
|
|
||||||
pub type Length = Au;
|
pub type Length = Au;
|
||||||
|
|
|
@ -14,7 +14,7 @@ use std::ops::Mul;
|
||||||
use style_traits::ToCss;
|
use style_traits::ToCss;
|
||||||
use style_traits::values::specified::AllowedNumericType;
|
use style_traits::values::specified::AllowedNumericType;
|
||||||
use super::{Angle, Number, SimplifiedValueNode, SimplifiedSumNode, Time};
|
use super::{Angle, Number, SimplifiedValueNode, SimplifiedSumNode, Time};
|
||||||
use values::{Auto, CSSFloat, Either, FONT_MEDIUM_PX, HasViewportPercentage, None_};
|
use values::{Auto, CSSFloat, Either, FONT_MEDIUM_PX, HasViewportPercentage, None_, Normal};
|
||||||
use values::computed::Context;
|
use values::computed::Context;
|
||||||
|
|
||||||
pub use super::image::{AngleOrCorner, ColorStop, EndingShape as GradientEndingShape, Gradient};
|
pub use super::image::{AngleOrCorner, ColorStop, EndingShape as GradientEndingShape, Gradient};
|
||||||
|
@ -952,6 +952,8 @@ impl Parse for LengthOrPercentageOrNone {
|
||||||
|
|
||||||
pub type LengthOrNone = Either<Length, None_>;
|
pub type LengthOrNone = Either<Length, None_>;
|
||||||
|
|
||||||
|
pub type LengthOrNormal = Either<Length, Normal>;
|
||||||
|
|
||||||
pub type LengthOrAuto = Either<Length, Auto>;
|
pub type LengthOrAuto = Either<Length, Auto>;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Copy, Debug)]
|
#[derive(Clone, PartialEq, Copy, Debug)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue