Skip to content
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

Add dark theme #1432

Open
vitaly-zdanevich opened this issue Feb 19, 2020 · 10 comments
Open

Add dark theme #1432

vitaly-zdanevich opened this issue Feb 19, 2020 · 10 comments

Comments

@vitaly-zdanevich
Copy link

Save our eyes. And batteries. Do not ignore this property of useragent https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

@pedrorijo91
Copy link
Member

Hey @vitaly-zdanevich

Thanks for raising this issue. We have a long effort for a re-design on #1179. @jasonlong :)

@BerndHme
Copy link

BerndHme commented Aug 8, 2023

I agree. Save our eyes. Please add a dark theme.

@h-shokri
Copy link

I really have problem with the light theme. Your website is so painful for most of users.

@sudoforge
Copy link

sudoforge commented Aug 7, 2024

i use qutebrowser and it has an in-built dark mode renderer:

colors.webpage.darkmode.enabled = true

this helps provide a dark mode for websites that don't respect colors.webpage.preferred_color_scheme = "dark". it also supports a couple different ways to approach changing the display of images in the DOM (see colors.webpage.darkmode.policy.images).

both of these fail to render git-scm.com in a dark mode -- more specifically, it works for text and many other elements, like anchor links, but fails with others because of the background images set via CSS using the background property (e.g. the masthead, and body background).

to get around this, i wrote a very tiny greasmonkey script and placed it in ~/.local/share/qutebrowser/greasemonkey/git-scm-background.js:

// ==UserScript==
// @name        Qutebrowser dark mode overrides for git-scm.com
// @version     0.0.0-alpha
// @author      sudoforge
// @license     Apache 2.0
// @include     https://git-scm.com/*
// @run-at      document-end
// ==/UserScript==

// I do this even though i have colors.webpage.darkmode enabled, because
// git-scm.com has a CSS property that sets the `background` prop using a
// light-colored image.
document.body.style.background = "#181818";

// This `background` prop for this element is originally set to transparent,
// with a light colored image.
masthead = document.getElementById("masthead");
if (masthead != null) {
    masthead.style.background = "#242424";
}

this is not a comprehensive rewrite at all. as you can see, it's just getting rid of the two largest annoyances for me. hope it helps.

@sudoforge
Copy link

there's also a large WIP effort to refactor away from RoR to a static site built with hugo (#1804), after which, it will hopefully be much easier for the team to add a native dark mode.

@dscho
Copy link
Member

dscho commented Sep 11, 2024

there's also a large WIP effort to refactor away from RoR to a static site built with hugo (#1804), after which, it will hopefully be much easier for the team to add a native dark mode.

That is my hope as well.

@To1ne
Copy link
Contributor

To1ne commented Sep 25, 2024

That is my hope as well.

@dscho Did you just nerd snipe me without knowing it? 😄

It's easy to make it look dark, but it's a lot of work to make everything look good. But I'm happy to collaborate on this.

@dscho
Copy link
Member

dscho commented Sep 25, 2024

@To1ne hehe, in retrospect it sounds like a fantastic idea to nerdsnipe you. I'm game for collaborating on that!

@dscho
Copy link
Member

dscho commented Sep 26, 2024

@To1ne I found this very nice resource, which I believe should make this quest doable. The really nice thing is that the color scheme seems to have been defined centrally already, in variables.scss, just like the article suggests.

@dscho
Copy link
Member

dscho commented Sep 27, 2024

@To1ne so I could not resist the temptation any longer. Here is a very drafty draft of the beginnings of dark mode support. Please do not scream at me for the poor choice of colors; I am distinctly not a designer. But this should provide a good start to get the ball rolling. Are you interested in playing around with it a bit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@To1ne @dscho @pedrorijo91 @vitaly-zdanevich @sudoforge @h-shokri @BerndHme and others