Derive Animate for BackgroundSize<L>

This commit is contained in:
Anthony Ramine 2017-08-26 16:39:59 +02:00
parent 318d8696e5
commit b543b17cf0
2 changed files with 5 additions and 19 deletions

View file

@ -5,8 +5,9 @@
//! Generic types for CSS values related to backgrounds.
/// A generic value for the `background-size` property.
#[derive(Clone, ComputeSquaredDistance, Copy, Debug, HasViewportPercentage, PartialEq, ToComputedValue, ToCss)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug)]
#[derive(HasViewportPercentage, PartialEq, ToComputedValue, ToCss)]
pub enum BackgroundSize<LengthOrPercentageOrAuto> {
/// `<width> <height>`
Explicit {
@ -16,8 +17,10 @@ pub enum BackgroundSize<LengthOrPercentageOrAuto> {
height: LengthOrPercentageOrAuto
},
/// `cover`
#[animation(error)]
Cover,
/// `contain`
#[animation(error)]
Contain,
}