Use generics for transition-timing-function 📈

This commit is contained in:
Anthony Ramine 2017-06-05 14:56:04 +02:00
parent 63be9d7af2
commit 874885e235
8 changed files with 300 additions and 412 deletions

View file

@ -5,12 +5,16 @@
//! Computed types for CSS values that are related to transformations.
use properties::animated_properties::Animatable;
use values::computed::{Length, LengthOrPercentage};
use values::computed::{Length, LengthOrPercentage, Number};
use values::generics::transform::TimingFunction as GenericTimingFunction;
use values::generics::transform::TransformOrigin as GenericTransformOrigin;
/// The computed value of a CSS `<transform-origin>`
pub type TransformOrigin = GenericTransformOrigin<LengthOrPercentage, LengthOrPercentage, Length>;
/// A computed timing function.
pub type TimingFunction = GenericTimingFunction<u32, Number>;
impl TransformOrigin {
/// Returns the initial computed value for `transform-origin`.
#[inline]