mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Derive ToCss for counter_style::Negative
This commit is contained in:
parent
7995a9ed51
commit
21ecf47693
1 changed files with 1 additions and 12 deletions
|
@ -380,7 +380,7 @@ impl Symbol {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// https://drafts.csswg.org/css-counter-styles/#counter-style-negative
|
/// 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>);
|
pub struct Negative(pub Symbol, pub Option<Symbol>);
|
||||||
|
|
||||||
impl Parse for Negative {
|
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
|
/// https://drafts.csswg.org/css-counter-styles/#counter-style-range
|
||||||
///
|
///
|
||||||
/// Empty Vec represents 'auto'
|
/// Empty Vec represents 'auto'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue