New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dark mode support #102
Dark mode support #102
Conversation
9a0e7e7
to
128343f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
86534eb
to
f813c29
Compare
Here's what I noticed while using dark mode:
|
One more thing: the little notch pointing at the (W) logo is still white. |
@@ -94,6 +94,28 @@ function createWindow() { | |||
} | |||
} ); | |||
|
|||
if ( process.platform === 'darwin' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to have the theme-light
class apply by default so that non-Mac clients have the light theme.
src/components/pages/style.scss
Outdated
} | ||
.theme-dark & { | ||
color: $light-gray-200; | ||
border-bottom: 1px solid $dark-gray-400; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This border doesn't seem to be visible
text-decoration: underline; | ||
cursor: pointer; | ||
background: none; | ||
display: block; | ||
font-size: inherit; | ||
margin: 10px 0; | ||
padding: 0; | ||
.theme-light & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might also need hover/focus/visited styles
} | ||
.theme-dark & { | ||
color: $blue-medium-200; | ||
border-bottom: 1px solid $dark-gray-400; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This border doesn't seem to be visible, maybe the colors are around the wrong way.
@@ -1,5 +1,5 @@ | |||
@import "../node_modules/@wordpress/components/build-style/style.css"; | |||
|
|||
@import "./_colors.scss"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this could be removed.
d39a01a
to
a5099cb
Compare
This PR adds support for #49
The
package.json
file has a new directive that instructs Electron to allow dark mode when the app is packaged, so the chrome respects the OS setting.The
election-runner.js
script has some logic that relays to the rendered the current system setting about dark mode and the changes to it when the user switches in System Settings.