~avalos/devault-css#1: 
Dark mode!

Current sr.ht css supports automatic switching to dark mode. Would be nice to have that here as well!

Status
REPORTED
Submitter
~brenthuisman
Assigned to
Submitted
3 years ago
Updated
3 years ago
Labels
No labels applied.

~avalos 3 years ago

Hey! I haven't updated this in a while. Currently, this project only contains SCSS, but I will see if I can include only the necessary JavaScript for automatic dark mode detection.

~brenthuisman 3 years ago

Actually, CSS can detect dark-mode itself too: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

I think I see sr.ht using it too, and as I though you basically copy that importing it afresh should not be too much effort. Or do you do some manual merging/editing?

~avalos 3 years ago*

I totally forgot prefers-color-scheme was a CSS thing. I already merged the latest files from the core.sr.ht repo, but I need to do some manual adjustments for icons. Since I'm not embedding directly the SVGs (as sr.ht does), I need to make the i.icon inline.

~brenthuisman 3 years ago

Is it possible the repo has a different dist.css than your demo website (https://devaultcss.avalos.me/)? On the website I see the darkmode taking effect and prefers-color-scheme in dist.css, but not in the repo yet.

Thanks for taking the effort!

Register here or Log in to comment, or comment via email.