summaryrefslogtreecommitdiff
path: root/src/components/shared
diff options
context:
space:
mode:
authorkunish <[email protected]>2023-01-26 18:11:16 +0800
committerkunish <[email protected]>2023-01-27 02:11:49 +0800
commit11704b9be37c7442ae5c7585e15ed16ef27849ae (patch)
tree0360194dbb37c8eda0e05db20d7818e4957d4ecf /src/components/shared
parent5fc78ff7810eb0f81fade218bbb364c615cca60e (diff)
fix: remove .btnStart unexpected margin-right
Diffstat (limited to 'src/components/shared')
-rw-r--r--src/components/shared/Basic.module.scss29
-rw-r--r--src/components/shared/ThemeSwitcher.module.scss7
2 files changed, 26 insertions, 10 deletions
diff --git a/src/components/shared/Basic.module.scss b/src/components/shared/Basic.module.scss
index 2cc0d0b..289b694 100644
--- a/src/components/shared/Basic.module.scss
+++ b/src/components/shared/Basic.module.scss
@@ -36,10 +36,7 @@ h2.sectionNameType {
*
*/
-:root[data-theme='light'] {
- /*
- * --loading-dot-{dot-index}-{dot-keyframe-phase}
- */
+@mixin light {
--loading-dot-1-1: rgba(0, 0, 0, 0.1);
--loading-dot-1-2: rgba(0, 0, 0, 0.5);
--loading-dot-1-3: rgba(0, 0, 0, 0.3);
@@ -50,7 +47,8 @@ h2.sectionNameType {
--loading-dot-3-2: rgba(0, 0, 0, 0.3);
--loading-dot-3-3: rgba(0, 0, 0, 0.1);
}
-:root[data-theme='dark'] {
+
+@mixin dark {
--loading-dot-1-1: rgba(255, 255, 255, 0.5);
--loading-dot-1-2: rgba(255, 255, 255, 0.1);
--loading-dot-1-3: rgba(255, 255, 255, 0.3);
@@ -62,6 +60,27 @@ h2.sectionNameType {
--loading-dot-3-3: rgba(255, 255, 255, 0.5);
}
+:root[data-theme='auto'] {
+ @media (prefers-color-scheme: dark) {
+ @include dark;
+ color-scheme: dark;
+ }
+ @media (prefers-color-scheme: light) {
+ @include light;
+ color-scheme: light;
+ }
+}
+
+:root[data-theme='dark'] {
+ @include dark;
+ color-scheme: dark;
+}
+
+:root[data-theme='light'] {
+ @include light;
+ color-scheme: light;
+}
+
.loadingDot,
.loadingDot:before,
.loadingDot:after {
diff --git a/src/components/shared/ThemeSwitcher.module.scss b/src/components/shared/ThemeSwitcher.module.scss
index c5de126..d2f296a 100644
--- a/src/components/shared/ThemeSwitcher.module.scss
+++ b/src/components/shared/ThemeSwitcher.module.scss
@@ -10,8 +10,6 @@
outline: none;
padding: 5px;
color: var(--color-text);
- border-radius: 100%;
- border: 1px solid transparent;
}
.iconWrapper:hover {
opacity: 0.6;
@@ -48,9 +46,8 @@
}
.iconWrapper {
pointer-events: none;
- display: inline-flex;
- align-items: center;
- justify-content: center;
+ width: 100%;
+ height: 100%;
position: absolute;
left: 0;
top: 0;