Update theme toggle mechanism
This commit is contained in:
parent
22687225b9
commit
246417a553
15 changed files with 425 additions and 200 deletions
|
|
@ -208,18 +208,29 @@ $mobile-navigation-height: 4rem;
|
|||
@include theme_light();
|
||||
}
|
||||
|
||||
html,
|
||||
html.light {
|
||||
@include theme_light();
|
||||
}
|
||||
|
||||
html.dark {
|
||||
@include theme_dark();
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
@include theme_dark();
|
||||
|
||||
&:has(#themeLight:checked) {
|
||||
@include theme_light();
|
||||
}
|
||||
}
|
||||
#themeToggleDark {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
html {
|
||||
@include theme_light();
|
||||
|
||||
&:has(#themeDark:checked) {
|
||||
@include theme_dark();
|
||||
}
|
||||
}
|
||||
#themeToggleLight {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue