Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> if using a JavaScript-based solution that fetches the theme preference from localStorage, I find this almost always results in a "flashbang" in dark mode, as the retrieval is slower than the first browser paint.

Not if you blockingly inline the three lines of JavaScript with a good old script tag right in the HTML.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: