Comment

Comment by guessmyname

That’s because the HTML code is server-side rendered (SSR) with data-theme="dark" hardcoded on the <html> element, so on the initial page load the browser immediately renders with dark mode styles applied. After ± 500ms-600ms Nuxt’s JavaScript hydration kicks in (as this is a Nuxt app based on __NUXT__ at line 11,236), which detects your macOS system preference via prefers-color-scheme media query and updates data-theme to "light".
parent guessmyname 9 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton