This css one liner can define how your site looks on a device with dark mode set in the browser settings.

@media (prefers-color-scheme: dark)

Or if your main style is dark mode, you can define how the light mode will look.

@media (prefers-color-scheme: light)
Source: CSS only dark mode without JS – Simon Dalvai

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.