Most dark mode extensions intercept every page load with a content script that injects CSS. Some use JavaScript-based theme detection, some use prefers-color-scheme media queries, some use their own inversion filters.
I wanted to understand why dark mode on the web is still such a mess, so I built NightOwl β a Firefox extension that applies dark mode without mutation observers and without touching pages it shouldn't.
The problem with most dark mode approaches
CSS inversion ( filter: invert(1) hue-rotate(180deg) ) is fast but breaks images, videos, and color-coded content. Media turns into negatives.
JavaScript-based theming can be more precise but adds latency to every page load. You see a white flash before the dark style applies.
Browser-level dark mode ( about:config > layout.css.prefers-color-scheme.content-override ) is the cleanest solution but only works for pages that actually support prefers-color-scheme .β¦