Micolithe
Agender
36 years old
Philadelphia, PA
Online Now
Last Login: 08/30/2007

Agender Enby, Trans, Gay, AND the bearer of the gamer's curse. Not a man, not a woman, but instead I am puppy.
I got a fat ass and big ears.

--

Yes I did the cooking mama Let's Play way back when. I post alot about Tech (mostly how it sucks) and Cooking and Music and Television Shows and the occasional Let's Play video
πŸ’–@FadeToZac

--

We all do what we can β™«

So we can do just one more thing β™«

We can all be free β™«

Maybe not in words β™«

Maybe not with a look β™«

But with your mind β™«


last.fm listening



britown
@britown

I don't know how this hooks into CSS or if @staff actually did this intentionally or how anything works at all! BUT if you set your app theme to dark in your windows personalization, Cohost gets all dark. Which is cool! A lot of sites actually handle this correctly like Youtube.


vogon
@vogon

can confirm that this is 100% intentional. the browser's rendering engine exports a CSS media feature called prefers-color-scheme that we use to set the site theme.

FAQ

Q: why is this the only way you can change the site theme?
A: when we first added the dark mode we had to choose one of "basing it on prefers-color-scheme" or "having an explicit switch for it" for technical reasons, and we chose the former because we didn't have an easy way of adding an explicit switch for it at the time and I thought it would be too expensive. jae roasts me about this decision every time the topic comes up.

Q: what about people on windows 7/other platforms that don't have a system theme?
A: as I found out at one point, you can also change the effective system theme in the browser settings if you use firefox. but yeah, this is a good question. it's on our radar.


jkap
@jkap

it wasn't too difficult, we had a very easy way of doing it (it's the exact same way we have of doing it now!), we were just trying to make the website Work Without JavaScript at the time (a dropped ideal because turns out it's really fucking difficult to do that in 2022, the Maybe Possible Future Basic HTML UI will have to be a separate frontend if it ever exists). we can still do it at this point, it's just that "redo how dark mode works internally" is so low priority that it hasn't come up.

SO MAYBE SOMEDAY. until then just change your OS setting or see if your browser supports changing it internally


also windows 7 isn't getting security updates anymore and you should probably upgrade your OS at some point


You must log in to comment.

in reply to @vogon's post:

we had to choose one of "basing it on prefers-color-scheme" or "having an explicit switch for it" for technical reasons, and we chose the former because we didn't have an easy way of adding an explicit switch for it at the time

You don't have to choose! Switch to class-based dark mode in tailwind css and then add a small inline script to the document head to check if the user wants dark mode and apply it.

Then, you can use javascript to watch for when the CSS media query changes to prefer dark mode. Now, you can have a user setting that defaults to the system setting

A bit of development effort for a slightly nicer user experience

as jae added in their share of my original post, we were attempting to avoid using client javascript on the site at that point -- it's truly a silly choice separated from the historically contingent aspect of it and we only haven't added it since because it's never been at the top of our stack of things to do

This works in Gnome on Linux systems as well!

Gnome 43 also adds a really nice "dark mode" toggle to the status menu, so I can just hit it on/off and all my apps (well, gtk apps + firefox) and websites within firefox change based on that. Earlier versions you would have to go into settings or script something, but it's now really convenient.

So not just Windows, at least! I don't know about macOS support.

in reply to @jkap's post:

I learned about this from seeing a friend sharing their screen and initially I didn't understand why their cohost was so dark, I wanted that! But at the same time I need Windows in light theme because the dark theme kinda sucks.

I much prefer using dark websites and dark software in general, I would even consider it an accessibility issue if I can't. The lightness! It's too intense! This is monsterist against vampires!