From 16ae12630892fd246761ca2acffc0a04666b9ad7 Mon Sep 17 00:00:00 2001 From: Akbar Rahman Date: Wed, 25 Dec 2024 19:40:43 +0000 Subject: [PATCH] create alwaysdark module --- modules/alwaysdark.css | 8 ++++++++ modules/darkmode.css | 11 +---------- modules/readmes/alwaysdark.txt | 5 +++++ 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 modules/alwaysdark.css create mode 100644 modules/readmes/alwaysdark.txt diff --git a/modules/alwaysdark.css b/modules/alwaysdark.css new file mode 100644 index 0000000..00586b5 --- /dev/null +++ b/modules/alwaysdark.css @@ -0,0 +1,8 @@ +@import url("https://styles.alv.cx/modules/soft_media.css"); + +:root { + --fg: var(--colorscheme-light); + --fg-lc: var(--colorscheme-light-darker); + --bg: var(--colorscheme-dark); + --bg-lc: var(--colorscheme-dark-lighter); +} diff --git a/modules/darkmode.css b/modules/darkmode.css index aab393b..14b4631 100644 --- a/modules/darkmode.css +++ b/modules/darkmode.css @@ -1,10 +1 @@ -@import url("https://styles.alv.cx/modules/soft_media.css") screen and (prefers-color-scheme: dark); - -@media (prefers-color-scheme: dark) { - :root { - --fg: var(--colorscheme-light); - --fg-lc: var(--colorscheme-light-darker); - --bg: var(--colorscheme-dark); - --bg-lc: var(--colorscheme-dark-lighter); - } -} +@import url("https://styles.alv.cx/modules/alwaysdark.css") screen and (prefers-color-scheme: dark); diff --git a/modules/readmes/alwaysdark.txt b/modules/readmes/alwaysdark.txt new file mode 100644 index 0000000..21fdbe7 --- /dev/null +++ b/modules/readmes/alwaysdark.txt @@ -0,0 +1,5 @@ +in the css + + @import url("https://styles.alv.cx/modules/alwaysdark.css"); + +puts the website always in dark mode, ignoring user preference.