Skip to content

Commit

Permalink
Merge pull request facebook#171 from bvaughn/improve-contrast-light-mode
Browse files Browse the repository at this point in the history
Improve contrast for light mode
  • Loading branch information
Brian Vaughn authored Apr 17, 2019
2 parents 85179fe + 3fb9f6c commit 29d43a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/devtools/views/Settings/SettingsContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
9 changes: 7 additions & 2 deletions src/devtools/views/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -127,5 +132,5 @@
* {
box-sizing: border-box;

-webkit-font-smoothing: antialiased;
-webkit-font-smoothing: var(--font-smoothing);
}

0 comments on commit 29d43a2

Please sign in to comment.