style: Tweak background: transparent handling so that color: transparent doesn't override UA sheet backgrounds.

Differential Revision: https://phabricator.services.mozilla.com/D68408
This commit is contained in:
Emilio Cobos Álvarez 2020-03-30 15:09:33 +00:00
parent 9fd243bb39
commit 3cb019ac1e

View file

@ -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.