From f17c42110c584857b1f310cab8295087d29bba61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 27 May 2023 15:55:40 +0200 Subject: [PATCH] style: Clean up button active system colors This patch does three things: * Unifies mac and gtk's buttonactivetext system colors (unships mac's from content, but it was never meant to be exposed). * Simplifies the forms.css rules, since 's color property value doesn't affect its rendering in any meaningful way. * Adds a buttonactiveface color, which we'll use to provide dark backgrounds for buttons in Windows dark mode (and is good practice, since generally every text system color should have a corresponding background). So as-is it shouldn't change content-exposed behavior (except we stop exposing the -moz-mac-buttonactivetext to content), but it's a worthy cleanup. Depends on D127246 Differential Revision: https://phabricator.services.mozilla.com/D127259 --- 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 332a5617805..6de2464d470 100644 --- a/components/style/values/specified/color.rs +++ b/components/style/values/specified/color.rs @@ -376,10 +376,12 @@ pub enum SystemColor { /// Used for button text when pressed. #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] - MozGtkButtonactivetext, + MozButtonactivetext, + + /// Used for button background when pressed. + #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] + MozButtonactiveface, - /// Used for button text when pressed. - MozMacButtonactivetext, /// Background color of chrome toolbars in active windows. MozMacChromeActive, /// Background color of chrome toolbars in inactive windows.