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

@ -13,7 +13,7 @@ use std::ops::{Add, Neg};
use style_traits::{CssWriter, ToCss};
use style_traits::values::specified::AllowedNumericType;
use super::{Number, ToComputedValue, Context, Percentage};
use values::{Auto, CSSFloat, Either, None_, Normal, specified};
use values::{Auto, CSSFloat, Either, Normal, specified};
use values::animated::{Animate, Procedure, ToAnimatedValue, ToAnimatedZero};
use values::computed::NonNegativeNumber;
use values::distance::{ComputeSquaredDistance, SquaredDistance};
@ -792,9 +792,6 @@ impl From<Au> for CSSPixelLength {
/// An alias of computed `<length>` value.
pub type Length = CSSPixelLength;
/// Either a computed `<length>` or the `none` keyword.
pub type LengthOrNone = Either<Length, None_>;
/// Either a computed `<length>` or the `auto` keyword.
pub type LengthOrAuto = Either<Length, Auto>;