mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
style: Add basic support for dark form controls to nsNativeBasicTheme
For that: * Tweak the standin system colors to match the non-native theme. * Use those system colors for button and field backgrounds. * Rename the "should use system colors" bit to "is high contrast", which is what it really is (specially now that we use system colors also in non-high-contrast). Border colors and other colors like the <input type=range> and such might need some extra tweaking perhaps, but this is a decent start and looks good in https://crisal.io/tmp/form-controls.html afaict (dark mode toggle needs the color-scheme pref enabled of course). Differential Revision: https://phabricator.services.mozilla.com/D127533
This commit is contained in:
parent
b6fa162955
commit
5766329ffe
1 changed files with 8 additions and 0 deletions
|
@ -316,8 +316,12 @@ pub enum SystemColor {
|
|||
Captiontext,
|
||||
#[parse(aliases = "-moz-field")]
|
||||
Field,
|
||||
/// Used for disabled field backgrounds.
|
||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
MozDisabledfield,
|
||||
#[parse(aliases = "-moz-fieldtext")]
|
||||
Fieldtext,
|
||||
|
||||
Graytext,
|
||||
Highlight,
|
||||
Highlighttext,
|
||||
|
@ -382,6 +386,10 @@ pub enum SystemColor {
|
|||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
MozButtonactiveface,
|
||||
|
||||
/// Used for button background when disabled.
|
||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
MozButtondisabledface,
|
||||
|
||||
/// Background color of chrome toolbars in active windows.
|
||||
MozMacChromeActive,
|
||||
/// Background color of chrome toolbars in inactive windows.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue