Oriel — AI & technology worth noticing, every day.

I was wrong about dark mode

Web page · https://dbushell.com/2026/11/09/dark-mode

First seen by Oriel on .

AI summary

The author reverses an earlier dismissal of site-level dark mode, arguing websites should provide it or thoroughly test compatibility with browsers’ adaptive and forced dark modes.

  • The implementation registers a --theme custom property, defaults to system preference through prefers-color-scheme, and applies dark colors using container style queries.
  • Most theming uses custom properties, while component exceptions use nested style queries or light-dark() with color-scheme set to the selected theme.
  • A two-state button overrides the system preference and stores the selection in localStorage, but offers no direct way to restore automatic system behavior.
  • Client-side initialization may cause a Flash of inAccurate coloR Theme when the saved choice differs from the system preference; cookies and server rendering would avoid it.
  • The author avoids setting color-scheme on the root <html> element because browsers inspect it for adaptive dark mode behavior, preferring verbose style queries for now.

#dark mode #css #web accessibility #color schemes

Generated by gpt-5.6-sol. Check the original for details.

Metric trends

Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained

Points

Score reported by the source.

  • Lobsters: 24, latest observation ; +23 over observed period since

Comments

Comment count reported by the source.

  • Lobsters: 13, latest observation ; +13 over observed period since

Aliases

SourceExternal IDURL
Lobstersiqhxz6https://dbushell.com/2026/11/09/dark-mode/ Read discussion