0

I've attempted

@media (prefers-color-scheme dark)

but it doesn't seem like that works for macOS on Safari? Works just fine on iOS Safari so I'm kind of confused. Is there a way to create like a fallback in case that doesn't work and the page defaults to a white page? Basically if @media (prefers-color-scheme dark) doesn't work, and the page defaults to light mode, is there any way to create a fallback so that it'll show it in dark mode before loading the page with light mode?

jasonhe
  • 134
  • 12

1 Answers1

0

Im not positive about what you want but I think setting the "@media (prefers-color-scheme: light){" to a dark background would function as a fallback. something like https://codepen.io/jonneal/pen/vzPwWo @media (prefers-color-scheme: light) {

Dftbaoso
  • 1
  • 1
  • Nevermind, just thought about the fact that if I wanted my page to use only dark mode, I could just use style="background-color: black;" to get the same thing – jasonhe Jun 11 '21 at 12:26
  • Simple enough! I thought you were trying to trick those dark mode extensions. This would be the workaround for that. – Dftbaoso Jun 14 '21 at 03:44