-
Notifications
You must be signed in to change notification settings - Fork 234
feature request: Dark mode #2182
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
Comments
In case this materializes, please implement theme-ability in a way that doesn't require one to be logged in. Also a "classic" theme would be nice (shameless plug: just released add-on). |
I think this completely acceptable, but I don't see any of the core devs working on this since it's pretty low on our list of stuff that seems broken. I mean, I can't read their minds, but that's kind of my impression. So, if someone else wants to do the heavy lifting, please do. Maybe hit us up with a plan before you sink a lot of time into it. https://github.com/metacpan/metacpan-docker |
@Altreus If you're really impatient, you may use the same approach our yesterday-released Firefox Add-On uses, client-side overrides. Just go there, fork and clone on github or just clone locally, and replace/copy into the core .js file what I've quickly hacked up for you during break:
Then load it as temporary add-on or generate a self-signed .xpi and you'll have this here: These overrides are admittedly hackish/heavy-handed and you might see flashes of the old white layout. |
@clipland Do you think it can be set with a simple css theme for Stylus? To something like that:
|
Stylus, the FF Add-On? |
Congrats! Nice color scheme. Even nicer: it seems configurable. Am I right in assuming (from first screencap) you came up with some sort of client-side config, relying on web-storage/localstorage/(browser-extension) - not requiring a login? Would be great. |
Yes, the plan is to make everything configurable, I also want to add functionality to change font size and family. Currently I am using local storage to cache the account profile so that I don't need to make an API request per page refresh. As I mentioned I am using an api and storing this against the author document. The reason I'm doing this is because I would like persistency between my devices, however I'll welcome more opinions on this. |
I really don't think we should have this be configurable on a per color basis. If someone wants to tweak individual colors, they can already do that with user stylesheets. Having a dark mode seems reasonable. |
That looks really good! |
Hello! Any progress with this feature? Still could be pretty useful. |
Thanks for the nudge. I've asked internally about what we need to do to get this merged. |
If you want something you can use now I wrote an extension: https://chrome.google.com/webstore/detail/metacpantheme/dmdmhdilgmmdnklgdnokgfcfnbegfkil?hl=en |
Note to anyone following/reading this: please make it standards conformant and not reliant on logins/auth of some sort.
|
+1 for the prefers-color-scheme feature. I think browsers can read the system preferences on OSes that support it, and feed that through, so if you've got your OS set to dark mode the browser will ask the site to prefer dark mode. |
One of the few big sites that still don't support dark mode. And it's so easy to implement (if you already know the colors to use). |
I would love to see dark mode as well, but someone needs to step up and volunteer the time. |
I can recommend this snippet from the bootstrap docs as a nice way to auto detect as well as save the color preference in local storage. Styling of course would all have to be figured out specific to MetaCPAN. https://getbootstrap.com/docs/5.3/customize/color-modes/#javascript |
Even a simple "follow system's color mode" would be great - can be done with plain CSS. See https://karelcom.net |
If there's a PR, we are happy to review it. |
I really think this should be set as first-priority. I think it's one of those things that separates neanderthal websites from active ones (according to the average modern web-user). I mean, people will see it. |
Many developers have their environments set to a dark background. Having metacpan be the only brilliant white window in one's entire desktop environment is ouchy.
An alternative CSS using a darker colour scheme (and the option to save the preference) would be supreme.
The text was updated successfully, but these errors were encountered: