style: Make css(dimension) apply to the variant.

This commit is contained in:
Emilio Cobos Álvarez 2017-11-12 15:50:12 +01:00
parent 4927786d90
commit 92944cd5eb
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
8 changed files with 39 additions and 37 deletions

View file

@ -41,14 +41,6 @@ pub fn serialize_percentage<W>(value: CSSFloat, dest: &mut W)
dest.write_str("%")
}
/// Serialize a value with given unit into dest.
pub fn serialize_dimension<W>(value: CSSFloat, unit: &str, dest: &mut W)
-> fmt::Result where W: fmt::Write
{
value.to_css(dest)?;
dest.write_str(unit)
}
/// Convenience void type to disable some properties and values through types.
#[cfg_attr(feature = "servo", derive(Deserialize, MallocSizeOf, Serialize))]
#[derive(Clone, Copy, Debug, PartialEq, ToComputedValue, ToCss)]