aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConnor Skees <connor1skees@gmail.com>2022-12-29 07:30:59 +0000
committerConnor Skees <connor1skees@gmail.com>2023-01-01 05:08:57 +0000
commit02c9591983642f5e8495cc3feaffe2ca0b744db0 (patch)
tree8904e0e4a9efceaf214ff5390547b8b4dd52c5d9
parentBump deps (diff)
downloadminiserve-02c9591983642f5e8495cc3feaffe2ca0b744db0.tar.gz
miniserve-02c9591983642f5e8495cc3feaffe2ca0b744db0.zip
update grass to 0.12.0
-rw-r--r--Cargo.toml2
-rw-r--r--data/style.scss24
2 files changed, 23 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index fb2b562..bc0a0b3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -83,4 +83,4 @@ url = "2"
fake-tty = "0.3.1"
[build-dependencies]
-grass = { version = "0.11", default-features = false }
+grass = { version = "0.12", default-features = false }
diff --git a/data/style.scss b/data/style.scss
index c172ae8..10c258d 100644
--- a/data/style.scss
+++ b/data/style.scss
@@ -757,7 +757,27 @@ th span.active span {
--footer_color: #56c9df;
}
+@mixin theme($name) {
+ @if $name == squirrel {
+ @include theme_squirrel();
+ }
+
+ @else if $name == archlinux {
+ @include theme_archlinux();
+ }
+
+ @else if $name == monokai {
+ @include theme_monokai();
+ }
+ @else if $name == zenburn {
+ @include theme_zenburn();
+ }
+
+ @else {
+ @error "Invalid theme: #{$name}";
+ }
+}
// For each of the themes, define a placeholder selector containing
// the themes variables. Then add selectors for body when the theme:
@@ -766,7 +786,7 @@ th span.active span {
// to the placeholder selector list by means of @extend.
@each $theme in $themes {
%theme_#{$theme} {
- @include theme_#{$theme};
+ @include theme($theme);
}
body.theme_#{$theme} {
@@ -785,7 +805,7 @@ th span.active span {
@each $theme in $themes {
@media (prefers-color-scheme: dark) {
%theme_dark_#{$theme} {
- @include theme_#{$theme};
+ @include theme($theme);
}
}