<p></p>
<p dir="auto">I experimented today with using <a href="https://getbootstrap.com/docs/5.3/customize/color-modes/" rel="nofollow">Bootstrap 5.3 built-in support for colour modes</a>. Here's a couple of screenshots for what it currently looks like:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/360803/269345727-d47c0147-5ab6-45c3-9c61-a499a3f856e8.png"><img src="https://user-images.githubusercontent.com/360803/269345727-d47c0147-5ab6-45c3-9c61-a499a3f856e8.png" alt="Screenshot from 2023-09-20 16-37-34" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/360803/269345731-8f7d4f95-6ca9-44aa-afb0-804f388d2cf2.png"><img src="https://user-images.githubusercontent.com/360803/269345731-8f7d4f95-6ca9-44aa-afb0-804f388d2cf2.png" alt="Screenshot from 2023-09-20 16-37-24" style="max-width: 100%;"></a></p>
<p dir="auto">This was a one-line change to turn on dark mode (<code class="notranslate">data-bs-theme="dark"</code> on <code class="notranslate"><html></code>), and is just a PoC (no automatic UA-driven switching etc). It also shows that more work needs to be done first, such as:</p>
<ul dir="auto">
<li>refactor how we define the background color for the content-heading so that it is driven by theme colours rather than a standard colour variable</li>
<li>refactor our override of the table striping</li>
<li>... I'm sure there's many other parts of the site that will need refactoring to fully work too.</li>
</ul>
<p dir="auto">We aren't even on bootstrap 5.3 yet, this was just while I was testing some other upgrades. But since colour themes are built into newer versions of bootstrap, this is definitely the way forward for implementing dark mode.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2332#issuecomment-1728044333">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJGFBKUKNXKBCF5FI3X3MINLANCNFSM4IHLU3FA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPMDJ3RO7NPZK4SP23X3MINLA5CNFSM4IHLU3FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOM3752LI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/2332/1728044333</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2332#issuecomment-1728044333",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2332#issuecomment-1728044333",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>