On my post pleading for a real dark mode for this site, @lexyeevee commented:
fwiw css crimes can't actually detect dark mode
Well, I've hacked dark modes into a lot of things before, so I take that as a challenge. And see, I can detect whether you've got light mode or dark mode selected in your browser preferences!
(If you're on firefox and this looks broken, view the post alone, which for some reason works better???)
Okay, yes, that form of "detection" is a very cheap trick, and honestly it won't even work properly with a screen reader, so that's a bust. But with a little cleverness, I can CSS Crimes my way into achieving a post that modifies itself appropriately based on whether the browser requests dark mode or light mode. If you are a light moder, this part of the post probably doesn't look special, but if you're a dark moder, this section should be entirely in a high-contrast dark mode.
Does it work on all browsers? Who knows! The trick at the top definitely won't work on Samsung's Android browser (in forced dark mode) or with custom styles, but I think the rest of this is pretty mundane use of CSS variables.
Now, this does rely on keying off the likes of var(--color-bg-text) and var(--color-background)which Cohost reserves the right to change at any time, so it's not exactly a good solution, but it is technically doable, the okayest kind of doable.