diff --git a/components/style/counter_style/mod.rs b/components/style/counter_style/mod.rs index 1ad385c4bfd..65f570ffa9d 100644 --- a/components/style/counter_style/mod.rs +++ b/components/style/counter_style/mod.rs @@ -550,7 +550,8 @@ impl Parse for Fallback { /// #[cfg_attr(feature = "gecko", derive(MallocSizeOf))] -#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue)] +#[css(iterable)] +#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue, ToCss)] pub struct Symbols(pub Vec); impl Parse for Symbols { @@ -570,22 +571,6 @@ impl Parse for Symbols { } } -impl ToCss for Symbols { - fn to_css(&self, dest: &mut CssWriter) -> fmt::Result - where - W: Write, - { - let mut iter = self.0.iter(); - let first = iter.next().expect("expected at least one symbol"); - first.to_css(dest)?; - for item in iter { - dest.write_char(' ')?; - item.to_css(dest)?; - } - Ok(()) - } -} - /// #[derive(Clone, Debug, ToCss)] pub struct AdditiveSymbols(pub Vec); diff --git a/components/style_derive/to_css.rs b/components/style_derive/to_css.rs index f86418b2361..bd70aebf3ea 100644 --- a/components/style_derive/to_css.rs +++ b/components/style_derive/to_css.rs @@ -131,6 +131,8 @@ struct CssInputAttrs { derive_debug: bool, function: Option, comma: bool, + // Here because structs variants are also their whole type definition. + iterable: bool, } #[darling(attributes(css), default)]