Repository navigation
First steps towards a dark theme - #4849
Conversation
These variables should be a good start but they're all still just copies of the light theme
The tertiary color had way to little contrast anyway
We need to lift this so that the `color: inherit` from CodeMirror's styles doesn't apply
We should probably split this out into a dedicated text box color
Withouth this the selected border and gutter color won't get applied
... so we can introduce another one for the count bubble in the PR tab
|
|
||
| /** Dialog */ | ||
| --dialog-warning-color: $yellow-600; | ||
| --dialog-warning-text-color: $yellow-800; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
This is ready for review. Note that I don't expect the reviewer to manually validate all of these color choices that I've made. We'll address those in an ongoing fashion. The review here should focus on whether enabling the dark theme manually and reloading works and whether the app in dark mode looks decent without anything major standing out. There's a few tasks in the PR body that's not done yet and that's also fine. I'll tackle those in follow-up PRs. |
nerdneha
left a comment
There was a problem hiding this comment.
code looks fine. but found this weird edge case for the background of the merge tool in the advanced preferences. will include image in a followup comment. i'm open to us fixing it in a future PR.
otherwise code looks fine
tested:
- toggling theme on/off
- panes/dropdowns: repositories, branches, PRs, changes, history, compare to branch
- resizing
- popups: discard changes, merge branch, preferences
- actions: coauthoring, undo,
Yeah, that's the salmon pink brutalism color, courtesy of @joshaber in this particular instance. It's a class that's defined in our It's only used as a means to ensure that @github/design never let's a feature through that hasn't been fully designed yet 😛 It's so ugly that we can't miss it. Additionally, and more importantly, it's only ever used for things hidden under a feature flag such as It serves its purpose as well in the dark theme as it does in the light theme. |
donokuda
left a comment
There was a problem hiding this comment.
Looks good here. Thanks for taking this on 🙏✨
|
Thumb up all around! Gonna get this merged so we can get #4919 reviewed and merged |
|
Is there anyway to automate this from the CLI? I'm looking to do some further testing with it? |
|
@nehayward not currently |


This PR adds the first piece of what will become a dark theme for GitHub Desktop. #4780 and #4810 preceded this PR in order to get us to a point where we could start working on a dark theme. The final colors and contrasts have not been locked in yet, think of this as a preview of roughly what we're thinking.
Enabling the dark theme
This PR only adds the style sheet itself and doesn't contain any method to select the dark theme in the UI. For testing purposes the theme can be enabled by setting the
themelocalStorage variable todarkand reloading the app.We'll work on a proper UI for selecting a theme as well as being able to switch themes without reloading the app in a follow-up PR.
Illustration woes
We've had some excellent help from @OiYouYeahYou (#3135, #3773) and @NickCraver (#1515 (comment)) towards making our illustrations dynamically styleable ❤️
Unfortunately that work hasn't made it into this PR. There are unfortunate edge cases with both approaches that we haven't had time to address. In the monochrome svgs colorized with css filters approach the
feColorMatrixapproach didn't want cooperate and always rendered the colors slightly off, I imagine this is due to use of different color spaces or perhaps simply incompetence on my part but I couldn't afford to spend more time looking into it. The second approach of inlining the SVGs into the markup doesn't suffer from that problem but unfortunately makes it a bit trickier for us to scale the illustrations correctly.I'm hoping we can get back to investigating these approaches and finding a way to accurately colorize our illustrations but for now I've had to settle for the quick-n-dirty approach of regular CSS filters.
TODO
These are the general TODOs that I've got on my list. I imagine we'll land this PR without solving most of them and instead address them in subsequent PRs but that's TBD.