From 3fb9f6cdaa47ed0094aed59ec5eb56fcaeca37b8 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Wed, 17 Apr 2019 11:40:55 -0700 Subject: [PATCH] Improve contrast for light mode --- src/devtools/views/Settings/SettingsContext.js | 3 +++ src/devtools/views/root.css | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/devtools/views/Settings/SettingsContext.js b/src/devtools/views/Settings/SettingsContext.js index f25f3a8153d96..d7838a2fc9598 100644 --- a/src/devtools/views/Settings/SettingsContext.js +++ b/src/devtools/views/Settings/SettingsContext.js @@ -247,6 +247,9 @@ function updateThemeVariables( updateStyleHelper(theme, 'color-search-match', documentElements); updateStyleHelper(theme, 'color-search-match-current', documentElements); updateStyleHelper(theme, 'color-text-color', documentElements); + + // Font smoothing varies based on the theme. + updateStyleHelper(theme, 'font-smoothing', documentElements); } export { SettingsContext, SettingsContextController }; diff --git a/src/devtools/views/root.css b/src/devtools/views/root.css index 24ce5b591538d..fd71c319ea9cc 100644 --- a/src/devtools/views/root.css +++ b/src/devtools/views/root.css @@ -28,7 +28,7 @@ --light-color-commit-gradient-8: #efbb49; --light-color-commit-gradient-9: #febc38; --light-color-commit-gradient-text: #000000; - --light-color-component-name: #8155cb; + --light-color-component-name: #6a51b2; --light-color-component-name-inverted: #ffffff; --light-color-dim: #777d88; --light-color-dimmer: #cfd1d5; @@ -95,6 +95,11 @@ --dark-color-selected-foreground: #ffffff; --dark-color-text-color: #ffffff; + /* Font smoothing */ + --light-font-smoothing: auto; + --dark-font-smoothing: antialiased; + --font-smoothing: auto; + /* Compact density */ --compact-font-size-monospace-small: 9px; --compact-font-size-monospace-normal: 11px; @@ -127,5 +132,5 @@ * { box-sizing: border-box; - -webkit-font-smoothing: antialiased; + -webkit-font-smoothing: var(--font-smoothing); }