I’ve seen a lot of discussion around the Web about updating websites with support for dark mode. Some doing it automatically, others with a toggle switch for user choice.
To my knowledge “dark mode” for websites isn’t yet a html standard.
I think Apples Safari for Mac is the only browser that supports using a “private media query” to determine the user is using dark mode and allow the website using CSS display a “dark mode” web page.
Other browser vendors may follow suit, especially if this specification gets adopted as an HTML standard.
I haven’t seen any RapidWeaver themes or stacks offering anything yet to make dark mode pages.
Yes - it’s coming and it’s coming soon! Safari and Firefox (desktop and mobile) already support this. The very next versions of Chrome, Edge and Safari(iOS) will too. Chrome for iOS and Android will follow soon after.
The project (Source) that I am working on just now will support it. If you view the Source landing page in a compatible browser (and your preference on your OS is for Dark mode) then you will automatically get the dark version of the page. If you don’t prefer dark mode (or you are using an incompatible browser) then you will get the regular version.
Great news! I’ve been able to implement Dark Mode in multiple projects using custom CSS. Here’s where you start, inserting into a page or site wide CSS box:
You’ll need to play around with it, targeting specific objects, but that should get you well on your way. The first part that you’ll want to change is the body tag. I implemented Dark Mode in three projects, using three different themes by Nick Cates, and each one needed a different set of tags.
Other than that, it took me about 30 minutes to get all three up to speed. Just make sure you have macOS in Dark Mode while you’re making adjustments to your code.
Special thanks to Team Realmac for the mobile simulator and live preview in RW8! Made playing around very easy.