mirror of
https://github.com/13hannes11/hugo-coder-timeline.git
synced 2024-09-04 00:50:58 +02:00
Automatic dark/light colorschemes (#234)
* Automatic dark/light colorschemes A new `colorscheme` option is added with the capability to be always dark, always light, or automatic based on the user's browser setting. This makes the `inverted` option superfluous, and therefore deprecated. Nomenclature of files, variables, etc are changed from `inverted` to `dark` to reflect this change. Closes #226. * Remove inverted option completely The `inverted` option is now not just deprecated, but removed completely.
This commit is contained in:
committed by
Luiz F. A. de Prá
parent
f6caaf0493
commit
b00b75064d
46
assets/scss/_content_dark.scss
Normal file
46
assets/scss/_content_dark.scss
Normal file
@@ -0,0 +1,46 @@
|
||||
@mixin content_dark {
|
||||
|
||||
.content {
|
||||
|
||||
.list {
|
||||
ul {
|
||||
li {
|
||||
.title {
|
||||
color: $fg-color-dark;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $link-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.centered {
|
||||
.about {
|
||||
ul {
|
||||
li {
|
||||
a {
|
||||
color: $fg-color-dark;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $link-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
body.colorscheme-dark {
|
||||
@include content_dark()
|
||||
}
|
||||
|
||||
body.colorscheme-auto {
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@include content_dark()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user