Replace LengthOrNone by a specific type for the perspective property

This was its only use, and it was bugged: AFAIK this didn't properly
clamp animated values below 0.
This commit is contained in:
Anthony Ramine 2018-02-26 15:46:41 +01:00
parent 4a98fa70bf
commit 260e05320c
11 changed files with 88 additions and 32 deletions

View file

@ -17,7 +17,7 @@ use std::ops::{Add, Mul};
use style_traits::{ParseError, StyleParseErrorKind};
use style_traits::values::specified::AllowedNumericType;
use super::{AllowQuirks, Number, ToComputedValue, Percentage};
use values::{Auto, CSSFloat, Either, None_, Normal};
use values::{Auto, CSSFloat, Either, Normal};
use values::computed::{self, CSSPixelLength, Context, ExtremumLength};
use values::generics::NonNegative;
use values::specified::NonNegativeNumber;
@ -1062,9 +1062,6 @@ impl NonNegativeLengthOrPercentage {
}
}
/// Either a `<length>` or the `none` keyword.
pub type LengthOrNone = Either<Length, None_>;
/// Either a `<length>` or the `normal` keyword.
pub type LengthOrNormal = Either<Length, Normal>;