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 mode #59

Closed
hossainemruz opened this issue Aug 4, 2020 · 8 comments · Fixed by #595
Closed

Add dark mode #59

hossainemruz opened this issue Aug 4, 2020 · 8 comments · Fixed by #595
Labels
Projects

Comments

@hossainemruz
Copy link
Member

https://dev.to/akhilarjun/one-line-dark-mode-using-css-24li

@alex-bezek
Copy link
Contributor

@hossainemruz FWIW this is what it does to my site
Before
image
image

After
image
image

I think largely it does the job well but there are a few sets of text that need some attention in order for their contrast ratio to be high enough. i assume if we figure those out we could easily turn this on with a feature flag in the config.yml to make this passive?

@hossainemruz hossainemruz added this to To do in Features Nov 30, 2020
@yeganathan18
Copy link

Hey @hossainemruz can you please tell me for darkmode in which CSS file should be the following code added,

html[theme='dark-mode'] {
    filter: invert(1) hue-rotate(180deg);
}

@hossainemruz
Copy link
Member Author

I am not sure yet @Yeganathan. Probably, @alex-bezek can help.

@yeganathan18
Copy link

yeganathan18 commented Dec 7, 2020

Thanks for the reply! @hossainemruz , Let me check with @alex-bezek

@alex-bezek
Copy link
Contributor

@yeganathan18 if you add a css file to this location, it will get picked up and included in the build
https://github.com/alex-bezek/blog/blob/master/static/assets/css/style.css

@yeganathan18
Copy link

@alex-bezek Thanks for the help :)

@donfiguerres
Copy link
Contributor

I'm experimenting with using DarkReader to enable dark mode in toha. My branch is here.
So far, the result is pretty decent. Not sure if that's biased because I'm using the DarkReader browser plugin. I think a native CSS for dark mode is faster but still, this gets the job done with minimal effort.

image
image

Website URL: https://donfiguerres.github.io/

@donfiguerres
Copy link
Contributor

Hi everyone! I've made a pull request to support dark theme via darkreader. Hoping that it gets approved.
I'm planning to add it to the toha documentation if the pull request gets approved.

@kodiakhq kodiakhq bot closed this as completed in #595 Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants