Prefers-Color-Scheme tutorial
Dark mode? Many apps supports this feature, now Chrome supports it too from version 76.
Actually, not Chrome add dark mode. it just be responsive to your system.
Introduction to Chrome76: https://developers.google.com/web/updates/2019/07/nic76
Broswer use media query to detect current mode of system:
@media (prefers-color-scheme: dark) {
...
}
prefer-color-scheme
supports: dark
,light
,no-preference
γ
Demo:
See the Pen by (@justforuse) on CodePen.
Youtube Video tutorial:
It is a cool stuff, give users better experience.
But compatibility is bad, cause it is a new feature.
π Please leave your comment if you like this.π