Add meta tag for color-scheme
Created by: felixfbecker
This prevents flashing a white background when reloading the page in dark mode and lets the browser pick better default styles, e.g. for forms. It also gives browser extensions adding dark modes to pages the ability to detect we have native dark mode and they shouldn't modify it.
More info: https://web.dev/prefers-color-scheme/
Also updates usage of deprecated APIs and moves the theme to <html>
/:root
instead of <body>
.
I tested manually in Chrome, Firefox and Safari that theme switching and auto-theme-switching still work.
cc @sqs you may want to copy this for doc, handbook and about.