Skip to content

Commit

Permalink
style: Tweak background: transparent handling so that color: transpar…
Browse files Browse the repository at this point in the history
…ent doesn't override UA sheet backgrounds.

Differential Revision: https://phabricator.services.mozilla.com/D68408
  • Loading branch information
emilio committed Apr 16, 2020
1 parent 9fd243b commit 3cb019a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions components/style/properties/cascade.rs
Expand Up @@ -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.
Expand Down

0 comments on commit 3cb019a

Please sign in to comment.