39 lines
761 B
Markdown
39 lines
761 B
Markdown
---
|
|
title: "Making a platonically ideal light/dark theme toggle on the web"
|
|
|
|
description: ""
|
|
|
|
date: "2025-08-20"
|
|
|
|
draft: true
|
|
|
|
tags: []
|
|
---
|
|
|
|
Many blogs and other sites have a way to toggle between their light and dark themes.
|
|
However many of these toggles are... not ideal, making various tradeoffs.
|
|
So I thought it'd be interesting to explore these tradeoffs and throw my own hat into the ring with a potentially better solution.
|
|
|
|
<a href="https://xkcd.com/927/"><img src="https://imgs.xkcd.com/comics/standards_2x.png"></a>
|
|
|
|
## What Does it Mean to be Ideal?
|
|
|
|
|
|
## The Obvious Way
|
|
|
|
[demo]()
|
|
|
|
## A Suboptimal Solution
|
|
|
|
A trick from from [](https://www.joshwcomeau.com/react/dark-mode/)
|
|
|
|
[demo]()
|
|
|
|
|
|
## An Ideal Stateless Toggle
|
|
|
|
[demo]()
|
|
|
|
## An ideal solution
|
|
|
|
|