From 152637294681837712d9ede65f9c70876e09ecd1 Mon Sep 17 00:00:00 2001 From: Alexey Yerin Date: Mon, 15 Mar 2021 19:37:54 +0300 Subject: [PATCH] Add dark theme It uses prefers-color-scheme CSS @media selector to determine which theme is used. Support table: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme#browser_compatibility --- static/style.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/static/style.css b/static/style.css index 3b9abd3..c96ea5e 100644 --- a/static/style.css +++ b/static/style.css @@ -57,3 +57,18 @@ body { /* Stretch to form width */ width: 100%; } + +@media screen and (prefers-color-scheme: dark) { + body { + background-color: #212529; + color: #f8f9fa; + } + + .form__input, + .form__button, + .textarea { + background-color: #131618; + border-color: #495057; + color: #f8f9fa; + } +}