jackbuehner / gmail-dark-modifications

Customizable Dark Theme for Gmail
https://github.com/jackbuehner/gmail-dark-modifications/raw/master/gmail-dark.less.user.css
35 stars 8 forks source link

Able to toggle with system color scheme? #20

Open joshl129 opened 3 years ago

joshl129 commented 3 years ago

Is it possible to use Stylus to change the Gmail color according to the system color scheme?

What I'm wanting to do is trigger dark mode automatically when my computer is set to go into dark mode system-wide (5:30 pm), but otherwise go back to the plain white theme of Google with no alterations. This is possible with Dark Reader, but I was attracted to your theme because it doesn't slow down my computer or Gmail at all.

I understand how to do this manually in several steps, namely:

To get light mode:

  1. Change Gmail theme to white
  2. Disable Stylus theme (and the reverse for dark mode - i.e., as you lay out in the directions)

This is tedious in itself compared to automatic switching, but I also have and regularly use 3 Gmail accounts, so this won't do. Given that Gmail itself doesn't have a timed automatic switching feature, the only way I could imagine this being possible is if Stylus had the timed feature + a theme that could enable light mode without step 1 above.

This is the first time I'm using Stylus -- I wasn't able to find anything poking around, but I figured I'd ask professionals who know what they're doing to see if Stylus can do this, or if you know of any workarounds? If this isn't possible with Stylus I may switch back to a Static version of Dark Reader or try out other extensions (just somewhat concerned about privacy, given the permissions).

I am using the latest version of Firefox on a Windows 10 computer, btw. Also, thank you so much for developing this! I'm also fairly noobish when it comes to GitHub and know almost nothing about code, so I appreciate any patience you're able to offer :)

jackbuehner commented 3 years ago

That would be a very nice feature, but unfortunately, it is not possible since this stylus theme is based on the built-in Gmail dark theme. Stylus only has the ability to change the CSS, but switching to the built-in Gmail theme requires you to click a several buttons in the Gmail interface

If you want to at least have the dark background for the email content and quick compose turn off when your system theme is set to light mode, you can edit the theme code:

For email viewer

For quick compose

Note that these line numbers are based on the line numbers from before any lines are added.