From 11704b9be37c7442ae5c7585e15ed16ef27849ae Mon Sep 17 00:00:00 2001 From: kunish Date: Thu, 26 Jan 2023 18:11:16 +0800 Subject: fix: remove .btnStart unexpected margin-right --- src/components/shared/Basic.module.scss | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'src/components/shared/Basic.module.scss') 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 { -- cgit v1.3.1