mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35: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
|
// We honor system colors more generally for all colors.
|
||||||
// colors.
|
|
||||||
//
|
//
|
||||||
// NOTE(emilio): This doesn't handle caret-color and
|
// We used to honor transparent but that causes accessibility
|
||||||
// accent-color because those use a slightly different syntax
|
// regressions like bug 1740924.
|
||||||
// (<color> | auto for example). That's probably fine though, as
|
//
|
||||||
// using a system color for caret-color doesn't make sense (using
|
// NOTE(emilio): This doesn't handle caret-color and accent-color
|
||||||
// currentColor is fine), and we ignore accent-color in
|
// because those use a slightly different syntax (<color> | auto for
|
||||||
// high-contrast-mode anyways.
|
// 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 let Some(color) = declaration.color_value() {
|
||||||
if color.is_system() || alpha_channel(color, context) == 0 {
|
if color.is_system() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue