diff --git a/components/style/properties/longhands/background.mako.rs b/components/style/properties/longhands/background.mako.rs index 4f0fb782779..e0ef021f32d 100644 --- a/components/style/properties/longhands/background.mako.rs +++ b/components/style/properties/longhands/background.mako.rs @@ -58,8 +58,8 @@ ${helpers.predefined_type( ${helpers.single_keyword( "background-attachment", - "scroll fixed" + (" local" if engine == "gecko" else ""), - engines="gecko servo-2013", + "scroll" + (" fixed" if engine in ["gecko", "servo-2013"] else "") + (" local" if engine == "gecko" else ""), + engines="gecko servo-2013 servo-2020", vector=True, gecko_enum_prefix="StyleImageLayerAttachment", spec="https://drafts.csswg.org/css-backgrounds/#the-background-attachment", diff --git a/components/style/properties/shorthands/background.mako.rs b/components/style/properties/shorthands/background.mako.rs index e7120a81635..ba9391cb8e8 100644 --- a/components/style/properties/shorthands/background.mako.rs +++ b/components/style/properties/shorthands/background.mako.rs @@ -6,7 +6,7 @@ // TODO: other background-* properties <%helpers:shorthand name="background" - engines="gecko servo-2013" + engines="gecko servo-2013 servo-2020" sub_properties="background-color background-position-x background-position-y background-repeat background-attachment background-image background-size background-origin background-clip" @@ -193,29 +193,6 @@ } -<%helpers:shorthand name="background" - engines="servo-2020" - sub_properties="background-color" - spec="https://drafts.csswg.org/css-backgrounds/#the-background"> - use crate::values::specified::Color; - use crate::parser::Parse; - - pub fn parse_value<'i, 't>( - context: &ParserContext, - input: &mut Parser<'i, 't>, - ) -> Result> { - Ok(expanded! { - background_color: Color::parse(context, input)? - }) - } - - impl<'a> ToCss for LonghandsToSerialize<'a> { - fn to_css(&self, dest: &mut CssWriter) -> fmt::Result where W: fmt::Write { - self.background_color.to_css(dest) - } - } - - <%helpers:shorthand name="background-position" engines="gecko servo-2013 servo-2020" flags="SHORTHAND_IN_GETCS"