From 53b657e97bfead75fe9d3a75fa9e990e8d70451c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 31 May 2023 11:43:21 +0200 Subject: [PATCH] style: Add a foreground color to attention selection In some platforms (like macOS, windows dark mode, android, and some gtk themes) the foreground selection color might be `currentcolor`, and that doesn't generally guarantee enough contrast with the attention background. Remove HeadlessLookAndFeelGTK's handling of this color since it's useless (always overridden by prefs in all.js) Differential Revision: https://phabricator.services.mozilla.com/D130617 --- components/style/values/specified/color.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/style/values/specified/color.rs b/components/style/values/specified/color.rs index fe22266ab23..89762777f67 100644 --- a/components/style/values/specified/color.rs +++ b/components/style/values/specified/color.rs @@ -232,9 +232,11 @@ pub enum Color { #[repr(u8)] pub enum SystemColor { #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] - TextSelectBackgroundDisabled, - #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] - TextSelectBackgroundAttention, + TextSelectDisabledBackground, + #[css(skip)] + TextSelectAttentionBackground, + #[css(skip)] + TextSelectAttentionForeground, #[css(skip)] TextHighlightBackground, #[css(skip)]