mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Partially back out bug 1105364
Apparently using transparent borders and outlines is a common accessibility technique to make those visible in HCM. Bug 1740924 comment 9 seemed to indicate we were the only browser rendering those browsers, but I just confirmed that Edge at least does show them. Keep respecting system colors as that's per spec. Differential Revision: https://phabricator.services.mozilla.com/D131412
This commit is contained in:
parent
7797a19c70
commit
71ec52f140
1 changed files with 12 additions and 9 deletions
|
@ -465,17 +465,20 @@ fn tweak_when_ignoring_colors(
|
|||
}
|
||||
},
|
||||
_ => {
|
||||
// We honor transparent and system colors more generally for all
|
||||
// colors.
|
||||
// We honor 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.
|
||||
// We used to honor transparent but that causes accessibility
|
||||
// regressions like bug 1740924.
|
||||
//
|
||||
// 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 {
|
||||
if color.is_system() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue