<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dark mode on Retro Dispatch</title><link>https://phantompixeldev.github.io/hugo-theme-retrocss/categories/dark-mode/</link><description>Recent content in Dark mode on Retro Dispatch</description><generator>Hugo</generator><language>en-us</language><copyright>© 2026 Retro Dispatch</copyright><lastBuildDate>Fri, 14 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://phantompixeldev.github.io/hugo-theme-retrocss/categories/dark-mode/index.xml" rel="self" type="application/rss+xml"/><item><title>Painting the right theme before the first frame</title><link>https://phantompixeldev.github.io/hugo-theme-retrocss/posts/painting-the-right-theme/</link><pubDate>Fri, 14 Aug 2026 00:00:00 +0000</pubDate><guid>https://phantompixeldev.github.io/hugo-theme-retrocss/posts/painting-the-right-theme/</guid><description>&lt;p&gt;A theme flash is not a rendering quirk. It is a page admitting that it decided
what colour to be after it had already been drawn.&lt;/p&gt;
&lt;h2 id="do-it-in-css"&gt;
 Do it in CSS
 &lt;a class="heading-anchor" href="#do-it-in-css" aria-label="Link to Do it in CSS"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The dark palette is emitted twice: once for &lt;code&gt;[data-theme=&amp;quot;dark&amp;quot;]&lt;/code&gt;, and once
under &lt;code&gt;@media (prefers-color-scheme: dark)&lt;/code&gt; for &lt;code&gt;:root:not([data-theme=&amp;quot;light&amp;quot;])&lt;/code&gt;.
A visitor whose system is dark gets dark on the first paint, before any script
has run — before the bundle has even been requested.&lt;/p&gt;</description></item></channel></rss>