From eb53a4caf8aa9977d5db4969665c49a16efb2f39 Mon Sep 17 00:00:00 2001
From: weru <onewesh@gmail.com>
Date: Tue, 06 Oct 2020 09:55:35 +0000
Subject: [PATCH] enable user to toggle color mode
---
assets/sass/_variables.sass | 30 +++++++++++++++++++++---------
1 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/assets/sass/_variables.sass b/assets/sass/_variables.sass
index 3d2e821..e0bf38c 100644
--- a/assets/sass/_variables.sass
+++ b/assets/sass/_variables.sass
@@ -1,4 +1,5 @@
html
+ --color-mode: "lit"
--light: #fff
--dark: rgb(28,28,30)
--haze: #f2f5f2
@@ -11,16 +12,27 @@
--border-color: #eee
--theme: rgb(52,199,89)
- &.has_magic
+ @mixin darkmode
+ --color-mode: "dim"
+ --theme: rgb(48,209,88)
+ --bg: var(--dark)
+ --text: #eee
+ --accent: var(--bubble)
+ --overlay: var(--bubble)
+ --border-color: transparent
+ *
+ box-shadow: none !important
+
+ &[data-mode="dim"]
+ @include darkmode
+ .color
+ &_choice
+ &::after
+ transform: translateX(1.75rem) scale(1.67)
+
+ &.has_magic:not(.nodarkmode):not([data-mode="lit"])
@media (prefers-color-scheme: dark)
- --theme: rgb(48,209,88)
- --bg: var(--dark)
- --text: #eee
- --accent: var(--bubble)
- --overlay: var(--bubble)
- --border-color: transparent
- *
- box-shadow: none !important
+ @include darkmode
%narrow
max-width: 750px
--
Gitblit v1.10.0