満MANZOKU満足 / SOCIAL BLOG
Sign in
All entries

Archive

Everything, in no particular order except time. The grid is the contact sheet; the feed is the conversation.

1 entry

Tagged #minimal · clear

My whole theme system is eleven lines. Dark mode should not need a framework.

const root = document.documentElement;
const saved = localStorage.getItem("theme");

if (saved) root.dataset.theme = saved;
else if (matchMedia("(prefers-color-scheme: dark)").matches)
  root.dataset.theme = "dark";