CSS only dark mode without JS – Simon Dalvai
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
https://monodes.com/predaelli/2023/08/13/css-only-dark-mode-without-js-simon-dalvai/
#Web #CSS
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
https://monodes.com/predaelli/2023/08/13/css-only-dark-mode-without-js-simon-dalvai/
#Web #CSS
CSS only dark mode without JS – Simon Dalvai
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 …Paolo Redaelli