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-schemesupports: 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.

Can I Use prefers-color-scheme? Data on support for the prefers-color-scheme feature across the major browsers from caniuse.com.


πŸ‘‡ Please leave your comment if you like this.πŸ‘‡