summaryrefslogtreecommitdiff
path: root/src/components/shared/ThemeSwitcher.module.scss
diff options
context:
space:
mode:
authoryaling888 <[email protected]>2022-05-06 03:55:39 +0800
committeryaling888 <[email protected]>2022-05-06 03:55:39 +0800
commitdafd4486f17fcd72ac86578854886a807b0c4748 (patch)
treed15d3345690f84000afda53c5c2f2ebe84cfdb8b /src/components/shared/ThemeSwitcher.module.scss
parent96c16b0ae5562cbe16b311da0ed9f839da172c4e (diff)
parent4dea888769ef153806bc5275616fd3c9d3e0a32b (diff)
Merge 'tracking' into master
Diffstat (limited to 'src/components/shared/ThemeSwitcher.module.scss')
-rw-r--r--src/components/shared/ThemeSwitcher.module.scss58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/components/shared/ThemeSwitcher.module.scss b/src/components/shared/ThemeSwitcher.module.scss
new file mode 100644
index 0000000..c5de126
--- /dev/null
+++ b/src/components/shared/ThemeSwitcher.module.scss
@@ -0,0 +1,58 @@
+.iconWrapper {
+ --sz: 40px;
+
+ width: var(--sz);
+ height: var(--sz);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ outline: none;
+ padding: 5px;
+ color: var(--color-text);
+ border-radius: 100%;
+ border: 1px solid transparent;
+}
+.iconWrapper:hover {
+ opacity: 0.6;
+}
+.iconWrapper:focus {
+ border-color: var(--color-focus-blue);
+}
+
+.themeSwitchContainer {
+ --sz: 40px;
+
+ position: relative;
+ display: flex;
+ align-items: center;
+ height: var(--sz);
+ select {
+ cursor: pointer;
+ padding-left: var(--sz);
+ width: var(--sz);
+ height: var(--sz);
+ appearance: none;
+ outline: none;
+ border-radius: 100%;
+ border: 1px solid transparent;
+ background: var(--color-bg-sidebar);
+ &:focus {
+ border-color: var(--color-focus-blue);
+ }
+ option {
+ // this has effect in Firefox
+ // Chrome and Safari use the native menu
+ background: var(--color-bg-sidebar);
+ }
+ }
+ .iconWrapper {
+ pointer-events: none;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ position: absolute;
+ left: 0;
+ top: 0;
+ }
+}