Auto and Manual Dark Mode Switching Is a Pain

This is a post in a new format called “microblog”, not quite a Mastodon post nor a full-blown blog post, you got the idea :) Changed my mind, blog (even small) is here, microblog is on Fediverse, no in between.

I was just working on adding a manual dark mode toggle to Duckquill as some people wanted to see it, and it turned out to be a huge pain (who might’ve though), it needs either:

The cleanest solution I’ve found is adding a checkbox that overrides the color variables to dark when checked, and adding JS that will save its state. This works, even with JS disabled, but it breaks the automatic theme switching based on OS style, ughhh.

QR code to a Mastodon post


You can comment on this blog post by publicly replying to this post using a Mastodon or other ActivityPub/Fediverse account. Known non-private replies are displayed below.

Go to TopFile an Issue