mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
style: Respect transparent and system color border colors in forced-colors mode
Differential Revision: https://phabricator.services.mozilla.com/D123111
This commit is contained in:
parent
f31f541125
commit
26c5db6a6e
2 changed files with 47 additions and 3 deletions
|
@ -464,7 +464,22 @@ fn tweak_when_ignoring_colors(
|
|||
}
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
_ => {
|
||||
// We honor transparent and system colors more generally for all
|
||||
// colors.
|
||||
//
|
||||
// NOTE(emilio): This doesn't handle caret-color and
|
||||
// accent-color because those use a slightly different syntax
|
||||
// (<color> | auto for example). That's probably fine though, as
|
||||
// using a system color for caret-color doesn't make sense (using
|
||||
// currentColor is fine), and we ignore accent-color in
|
||||
// high-contrast-mode anyways.
|
||||
if let Some(color) = declaration.color_value() {
|
||||
if color.is_system() || alpha_channel(color, context) == 0 {
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
*declaration.to_mut() =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue