/* rules that applies globally */ body { font-family: system-ui, -apple-system, sans-serif; } .dark-mode-toggle { cursor: pointer; padding: 1em; /* hide toggle until we're sure user has JS enabled */ visibility: hidden; } /* theme-specific rules -- you probably only want color-related stuff here */ body.light { background-color: #fff; color: #222; } body.dark { background-color: #222; color: #fff; }