docsify-darklight-theme icon indicating copy to clipboard operation
docsify-darklight-theme copied to clipboard

Utilize "prefers-color-scheme" to set default theme

Open crutchcorn opened this issue 3 years ago • 1 comments

Many users set their light/dark mode theme in their operating system.

By using prefers-color-scheme, we can set the default site theme to match with the expected theme.

Windows 10/11, macOS, Android, iOS, and many Linux distributions all support this functionality

crutchcorn avatar Aug 02 '21 02:08 crutchcorn

Oh, apologies - it seems that this is currently supported on first page load. However, on subsequent page refreshes (even if manually not set), it doesn't change.

Might be nice to have detection to see if manually set or not

crutchcorn avatar Aug 02 '21 02:08 crutchcorn