diff --git a/components/style/properties/cascade.rs b/components/style/properties/cascade.rs index d6c3180acd2..e9a34d6bf34 100644 --- a/components/style/properties/cascade.rs +++ b/components/style/properties/cascade.rs @@ -372,13 +372,12 @@ fn tweak_when_ignoring_colors( // We honor color and background-color: transparent, and // "revert-or-initial" otherwise. PropertyDeclaration::BackgroundColor(ref color) => { - if color.is_transparent() { - return; + if !color.is_transparent() { + let color = builder.device.default_background_color(); + declarations_to_apply_unless_overriden.push( + PropertyDeclaration::BackgroundColor(color.into()) + ) } - let color = builder.device.default_background_color(); - declarations_to_apply_unless_overriden.push( - PropertyDeclaration::BackgroundColor(color.into()) - ) } PropertyDeclaration::Color(ref color) => { // otherwise.