summaryrefslogtreecommitdiff
path: root/public/style.css
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-02-03 23:40:06 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-05 13:26:41 +0100
commit2394f481b12aeb75db4c61ef00eddfd65bb54e8a (patch)
tree4b90aac57245be197b3aab993e66095969822ea6 /public/style.css
parent0dcf5df6d0197635ee3a6c837c21022e630f657f (diff)
downloadserver-2394f481b12aeb75db4c61ef00eddfd65bb54e8a.tar.gz
Very basic dark mode theme.
Tone down the background color to light gray instead of white, if dark mode is preferred by the browser.
Diffstat (limited to 'public/style.css')
-rw-r--r--public/style.css12
1 files changed, 12 insertions, 0 deletions
diff --git a/public/style.css b/public/style.css
index a28676f..c4b0b9e 100644
--- a/public/style.css
+++ b/public/style.css
@@ -81,6 +81,7 @@ p.warning::before { content: "\26a0"; }
/* TABLES */
table {
+ background-color: white;
min-width: min(50rem,100%);
border-collapse: collapse;
border: 1px solid black;
@@ -105,6 +106,7 @@ td.is_active { background-color: lemonchiffon; }
/* FORUM AND MESSAGE POSTS */
div.post {
+ background-color: white;
max-width: 50em;
margin-top: 24px;
border: 1px solid black;
@@ -194,3 +196,13 @@ article hr + p { font-style: italic; }
.game_item.your_turn a:hover { color: #860 }
.game_item.unread .game_head div::after { content: " \1f4dd "; }
+
+/* DARK MODE */
+@media (prefers-color-scheme: dark) {
+ body { background-color: silver }
+ header { background-color: darkgray }
+ table, div.post { background-color: gainsboro }
+ thead, tfoot, div.post > div.head { background-color: darkgray }
+ input, textarea { background-color: gainsboro }
+ input:focus, textarea:focus { outline-color: cornflowerblue }
+}