Derive ToCss for counter_style::Negative

This commit is contained in:
Anthony Ramine 2017-07-11 15:00:38 +02:00
parent 7995a9ed51
commit 21ecf47693

View file

@ -380,7 +380,7 @@ impl Symbol {
}
/// https://drafts.csswg.org/css-counter-styles/#counter-style-negative
#[derive(Debug, Clone)]
#[derive(Debug, Clone, ToCss)]
pub struct Negative(pub Symbol, pub Option<Symbol>);
impl Parse for Negative {
@ -392,17 +392,6 @@ impl Parse for Negative {
}
}
impl ToCss for Negative {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
self.0.to_css(dest)?;
if let Some(ref symbol) = self.1 {
dest.write_char(' ')?;
symbol.to_css(dest)?
}
Ok(())
}
}
/// https://drafts.csswg.org/css-counter-styles/#counter-style-range
///
/// Empty Vec represents 'auto'