all repos — h3rald @ a2feb7e8732ca6f17d6975099f3782d47608a6c2

The sources of https://h3rald.com

Theme switcher.
h3rald h3rald@h3rald.com
Sat, 10 Feb 2024 15:24:58 +0100
commit

a2feb7e8732ca6f17d6975099f3782d47608a6c2

parent

6310a3a58cbbc3274946cd7bdfdc41095b41529a

1 files changed, 28 insertions(+), 30 deletions(-)

jump to
M assets/styles/style.cssassets/styles/style.css

@@ -1,7 +1,6 @@

/* Theme Switcher */ /* Credits: https://endtimes.dev/no-javascript-dark-mode-toggle/ */ -/* Tutorial CSS starts here */ :root { --html-font-size: 18px;

@@ -26,23 +25,6 @@ --warning-color: #FFAF00;

--error-color: #DB141A; } -@media (prefers-color-scheme: dark) { - :root { - --link-color: #e96363; - --link-hover-color: #ff6e6e; - - --heading-text-color: #dddada; - --primary-text-color: #c7c7c7; - --secondary-text-color: #e0e0e0; - - --primary-background: #1e1e1e; - --secondary-background: #262626; - - --success-color: #28b869; - --warning-color: #C97D05; - --error-color: #da3c3c; - } -} #color-mode:checked~* { --link-color: #e96363;

@@ -60,7 +42,35 @@ --warning-color: #C97D05;

--error-color: #da3c3c; } +.color-scheme-wrapper { + min-height: 100vh; +} + +.light-mode-hide { + display: none; +} + +.dark-mode-hide { + display: initial; +} + @media (prefers-color-scheme: dark) { + :root { + --link-color: #e96363; + --link-hover-color: #ff6e6e; + + --heading-text-color: #dddada; + --primary-text-color: #c7c7c7; + --secondary-text-color: #e0e0e0; + + --primary-background: #1e1e1e; + --secondary-background: #262626; + + --success-color: #28b869; + --warning-color: #C97D05; + --error-color: #da3c3c; + } + #color-mode:checked~* { --link-color: #b73333; --link-hover-color: #653131;

@@ -76,23 +86,11 @@ --success-color: #00B918;

--warning-color: #FFAF00; --error-color: #DB141A; } -} - -.color-scheme-wrapper { - min-height: 100vh; -} -.light-mode-hide { - display: none; -} - -@media (prefers-color-scheme: dark) { .dark-mode-hide { display: none; } -} -@media (prefers-color-scheme: dark) { .light-mode-hide { display: initial; }