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

Remove dark theme customisation? #1

Open
hadley opened this issue Nov 9, 2020 · 5 comments
Open

Remove dark theme customisation? #1

hadley opened this issue Nov 9, 2020 · 5 comments

Comments

@hadley
Copy link

hadley commented Nov 9, 2020

I was surprised by the default display of the site:

Screenshot 2020-11-09 at 3 42 56 PM

Screenshot 2020-11-09 at 3 43 42 PM

But I think this is because you have:

/* dark theme */
@media (prefers-color-scheme: dark) {
  body {
    background-color: darkslategray;
    filter: invert(1);
  }
  img { filter: invert(1); }
  .article-list { box-shadow: 0 0 8px #333; }
}

I think the site is much more aesthetically pleasing if you don't invert all the colours.

@yihui
Copy link
Owner

yihui commented Nov 10, 2020

The README says this is work-in-progress. I'm not ready for feedback yet. The colors are kind of arbitrarily chosen. Thanks!

@apreshill
Copy link
Contributor

apreshill commented Nov 13, 2020

Hi @yihui,

I'm playing with this today, and finding it really tricky to use/customize with the this inversion (even if the colors were changed). I think you could disable altogether (I did this on my personal site), as doing any kind of browser accessibility checks may be an endless vortex very time-consuming, as you'd have to ensure that both light and dark schemes meet minimum accessibility requirements.

If you want to keep, I do like having actual control over this setting within the browser window itself, as the academic theme does with the button in the top navbar:

https://academic-demo.netlify.app/

Without icons like feather or fontawesome (which I think eventually we'll need to make the theme more usable for people and teams, because folks need to link out to all the various things like GitHub, Twitter, Instagram, ImpactStory, ORCID, Patreon, Twitch, etc.), I can imagine you could do a CSS version of this kind of thing:

il_570xN 1162909777_562b

But I don't believe I've stumbled upon a site that uses this CSS trick, so it makes it surprisingly hard to work with. Also, as I am imagining teaching, it would be a nightmare to have screenshots, and to have different people sitting next to each other seeing drastically different websites locally, based on a setting they probably don't even realize they have on their own workstation.

At the least, I think we should move that bit of CSS to a partial layout file so you can turn it on/off with a setting in the configuration file. There may be a better way that I'm not familiar with too, but the main idea being that we make it a very clear "knob" in the main config file. I can offer a PR to do this, but wanted to open up the discussion first. But again, I'm not certain this is an actually important feature. As in, I think some users like to be able to switch between light/dark modes (that they can control), but I don't think it is the deciding factor for site authors between one theme vs another for most (vs say, search :))

@yihui
Copy link
Owner

yihui commented Nov 13, 2020

@apreshill Rest assured that the dark mode will be both improved and configurable eventually. The simple inverse trick was there only as a proof of concept in the four-day old project, and definitely not meant to be delivered in the final product. Sorry I should have clarified that earlier, so you wouldn't need to spend the time trying to convince me. Thank you!

@apreshill
Copy link
Contributor

Ah hooray! Sorry for the pedantic issue then 😉

@apreshill
Copy link
Contributor

Just wanted to share a few themes I found yesterday that do this:

https://themes.gohugo.io/theme/anatole/ (top right)

https://themes.gohugo.io/theme/hugo-coder/ (bottom right)

https://cupper-hugo-theme.netlify.app/ (scroll down)

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

3 participants