style: Add support to the animation shorthand and fix parsing of animation-name.

This commit is contained in:
Emilio Cobos Álvarez 2016-07-01 12:12:56 -07:00 committed by Emilio Cobos Álvarez
parent 4fafcb121f
commit 411ae84908
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 194 additions and 46 deletions

View file

@ -235,11 +235,21 @@
}
}
pub use self::computed_value::${to_camel_case(name)} as SingleSpecifiedValue;
#[inline]
pub fn parse_one(input: &mut Parser) -> Result<SingleSpecifiedValue, ()> {
SingleSpecifiedValue::parse(input)
}
#[inline]
pub fn get_initial_value() -> computed_value::T {
computed_value::T(vec![
computed_value::${to_camel_case(name)}::${to_rust_ident(values.split()[0])}
])
computed_value::T(vec![get_initial_single_value()])
}
#[inline]
pub fn get_initial_single_value() -> SingleSpecifiedValue {
SingleSpecifiedValue::${to_rust_ident(values.split()[0])}
}
#[inline]