Light theme for the documentation page (#931)

* light theme for docs, wip

* several switchers, fixes

* format

* fix

* sooner apllication of user's theme

* dark theme by default
This commit is contained in:
trean
2024-05-30 19:06:12 +02:00
committed by GitHub
parent e70771dde3
commit 6f49a1e761
24 changed files with 386 additions and 33 deletions
@@ -0,0 +1,34 @@
.theme-switch {
display: block;
width: $spacer * 1.25;
height: $spacer * 1.25;
border-radius: 50%;
background-color: transparent;
border: 0;
@mixin mask($url) {
mask: url($url);
mask-repeat: no-repeat;
mask-size: contain;
mask-position: center;
-webkit-mask: url($url);
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: contain;
-webkit-mask-position: center;
}
&[data-theme-label='light'] {
@include mask('/icons/outline/sun.svg');
background-color: $neutral-60;
}
&[data-theme-label='dark'] {
@include mask('/icons/outline/moon.svg');
background-color: $neutral-60;
}
&[data-theme-label='auto'] {
@include mask('/icons/outline/half-circle.svg');
background-color: $neutral-60;
}
}