A Somewhat Non-Trivial Demo of Custom Theming with Tailwind in Next.js Using Cookies and SSR to Avoid the Infamous Flash of Unstyled Content 😱

Refresh the page to check for a flash of unstyled content. There should not be one.

Set styles in styles/theme.css and extend the theme in tailwind.config.css

If all goes well, there should be no FOUC when reloading the page and the theme should also change with system preferences.