Although I’m not a developer, I’m always fascinated by how much can be improved with very little source code.

The following one-liner makes a page’s layout automatically switch between light and dark mode even without CSS. It only needs to be inserted into <head>:

<meta name="color-scheme" content="light dark" />

I found this at @scy.

The text was automatically translated from German into English. The German quotations were also translated in sense.