diff --git a/components/style/font_face.rs b/components/style/font_face.rs index 04554ca81ae..b180e1e7fe2 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -75,7 +75,7 @@ add_impls_for_keyword_enum!(FontDisplay); /// A font-weight value for a @font-face rule. /// The font-weight CSS property specifies the weight or boldness of the font. #[cfg(feature = "gecko")] -#[derive(Clone, Debug, PartialEq, Eq)] +#[derive(Clone, Debug, Eq, PartialEq, ToCss)] pub enum FontWeight { /// Numeric font weights for fonts that provide more than just normal and bold. Weight(font_weight::T), @@ -85,17 +85,6 @@ pub enum FontWeight { Bold, } -#[cfg(feature = "gecko")] -impl ToCss for FontWeight { - fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - match *self { - FontWeight::Normal => dest.write_str("normal"), - FontWeight::Bold => dest.write_str("bold"), - FontWeight::Weight(ref weight) => weight.to_css(dest), - } - } -} - #[cfg(feature = "gecko")] impl Parse for FontWeight { fn parse<'i, 't>(_: &ParserContext, input: &mut Parser<'i, 't>)