From 8cf3e3001f2cbd18da73fcc92ae5f4b76d3ecf21 Mon Sep 17 00:00:00 2001
From: Patsagorn Y. <49602385+ptsgrn@users.noreply.github.com>
Date: Thu, 16 Jan 2025 20:44:33 +0000
Subject: [PATCH] feat(i18n): Thai translations (#1722)
---
quartz/components/styles/darkmode.scss | 43 ++++++++++++++++++++++---------------------
1 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/quartz/components/styles/darkmode.scss b/quartz/components/styles/darkmode.scss
index 561a83c..edf4e61 100644
--- a/quartz/components/styles/darkmode.scss
+++ b/quartz/components/styles/darkmode.scss
@@ -1,45 +1,46 @@
.darkmode {
- float: right;
- padding: 1rem;
- min-width: 30px;
+ cursor: pointer;
+ padding: 0;
position: relative;
-
- @media all and (max-width: 450px) {
- padding: 1rem;
- }
-
- & > .toggle {
- display: none;
- box-sizing: border-box;
- }
+ background: none;
+ border: none;
+ width: 20px;
+ height: 20px;
+ margin: 0 10px;
+ text-align: inherit;
& svg {
- cursor: pointer;
- opacity: 0;
position: absolute;
width: 20px;
height: 20px;
top: calc(50% - 10px);
- margin: 0 7px;
fill: var(--darkgray);
transition: opacity 0.1s ease;
}
}
-:root[saved-theme="dark"] .toggle ~ label {
+:root[saved-theme="dark"] {
+ color-scheme: dark;
+}
+
+:root[saved-theme="light"] {
+ color-scheme: light;
+}
+
+:root[saved-theme="dark"] .darkmode {
& > #dayIcon {
- opacity: 0;
+ display: none;
}
& > #nightIcon {
- opacity: 1;
+ display: inline;
}
}
-:root .toggle ~ label {
+:root .darkmode {
& > #dayIcon {
- opacity: 1;
+ display: inline;
}
& > #nightIcon {
- opacity: 0;
+ display: none;
}
}
--
Gitblit v1.10.0