main.scss: add comments

This commit is contained in:
Aminda Suomalainen ⚧ 2024-05-27 08:01:45 +03:00
parent c01b5f9eee
commit bc210ed426
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
1 changed files with 11 additions and 8 deletions

View File

@ -4,24 +4,20 @@
@import "{{ site.theme }}"; @import "{{ site.theme }}";
// Declares support for light and dark themes as high as possible
:root { :root {
color-scheme: light dark !important; color-scheme: light dark !important;
} }
// Reverts all colors to browser default so light/dark modes are supported
// without extra work and we get free accessibility
* { * {
color: revert !important; color: revert !important;
text-color: revert !important; text-color: revert !important;
background-color: revert !important; background-color: revert !important;
} }
@media (prefers-color-scheme: dark) { // Fix transparent mobile navbar
.site-nav {
color-scheme: only dark !important;
color: #ffffff !important;
background-color: #1c1b22 !important;
}
}
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
.site-nav { .site-nav {
color-scheme: only light !important; color-scheme: only light !important;
@ -29,3 +25,10 @@
background-color: #ffffff !important; background-color: #ffffff !important;
} }
} }
@media (prefers-color-scheme: dark) {
.site-nav {
color-scheme: only dark !important;
color: #ffffff !important;
background-color: #1c1b22 !important;
}
}