Reverse Number and LengthOrPercentage in LengthOrPercentageOrNumber

"0" must be parsed as the number 0, not the unitless 0px length.
This commit is contained in:
Anthony Ramine 2017-04-28 11:51:24 +02:00
parent f1287814db
commit 193e1d5569
6 changed files with 18 additions and 11 deletions

View file

@ -468,7 +468,7 @@ impl ToCss for SVGPaint {
}
/// <length> | <percentage> | <number>
pub type LengthOrPercentageOrNumber = Either<LengthOrPercentage, Number>;
pub type LengthOrPercentageOrNumber = Either<Number, LengthOrPercentage>;
#[derive(Clone, PartialEq, Eq, Copy, Debug)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]