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 <input type=color>'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
This commit is contained in:
Emilio Cobos Álvarez 2023-05-27 15:55:40 +02:00 committed by Oriol Brufau
parent 3c0a1f2cb2
commit f17c42110c

View file

@ -376,10 +376,12 @@ pub enum SystemColor {
/// Used for button text when pressed. /// Used for button text when pressed.
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] #[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. /// Background color of chrome toolbars in active windows.
MozMacChromeActive, MozMacChromeActive,
/// Background color of chrome toolbars in inactive windows. /// Background color of chrome toolbars in inactive windows.