From d558b38cd7c5157ec341158ed3fb84e81959a8a5 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 3 Mar 2025 14:23:31 +0100 Subject: [PATCH] Add dark color-scheme for samples --- samples/styles.css | 30 ++++++++++++++++++++++++++++++ styles.css | 2 -- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/samples/styles.css b/samples/styles.css index a13a524..06c5555 100644 --- a/samples/styles.css +++ b/samples/styles.css @@ -1,3 +1,14 @@ +body { + color: #000; + background-color: #eee; +} + +input, textarea { + color: #000; + background-color: #f5f5f5; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); +} + .my-block { max-width: 500px; margin: 0 auto; @@ -52,3 +63,22 @@ .bes-status-icon.bes-status-mistakes { background-image: url('images/mistake-svgrepo-com.svg'); } + +@media (prefers-color-scheme: dark) { + body { + color: #eee; + background-color: #444; + font-weight: bolder; + } + + input, textarea { + color: #eee; + background-color: #222; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); + } + + .my-control { + background-color: #222; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); + } +} diff --git a/styles.css b/styles.css index 3a3a543..0e2e12c 100644 --- a/styles.css +++ b/styles.css @@ -1,5 +1,3 @@ -/* TODO: Dark mode theme */ - /* Mistake types styles */ .bes-spelling-mistake { border-bottom: 2px solid #ff7300;