summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2025-02-13 22:37:26 +0100
committerFederico Angelilli <code@fedang.net>2025-02-13 22:37:26 +0100
commit2570061c8a9fe49cae0e10c8d351692272373fba (patch)
tree4e2af7f47591932aab43ff5e9e4e371a0bea5971
parentb4f3cb47cf2a5bbb3ccb9eba8da8aedb67d01b30 (diff)
Fix syntax highlighting theme
-rw-r--r--assets/css/syntax.css2
-rw-r--r--content/posts/pointer-tagging/index.md (renamed from content/posts/pointer-tagging.md)0
-rwxr-xr-xsyntax.sh2
3 files changed, 4 insertions, 0 deletions
diff --git a/assets/css/syntax.css b/assets/css/syntax.css
index 2bd5b78..322824e 100644
--- a/assets/css/syntax.css
+++ b/assets/css/syntax.css
@@ -12,6 +12,7 @@
}
/* Chroma style: xcode */
+@media (prefers-color-scheme: light) {
/* Background */ .bg { background-color:#fff; }
/* PreWrapper */ .chroma { background-color:#fff; }
/* Other */ .chroma .x { }
@@ -98,6 +99,7 @@
/* GenericTraceback */ .chroma .gt { }
/* GenericUnderline */ .chroma .gl { }
/* TextWhitespace */ .chroma .w { }
+}
/* Chroma style: modus-vivendi */
diff --git a/content/posts/pointer-tagging.md b/content/posts/pointer-tagging/index.md
index a41c601..a41c601 100644
--- a/content/posts/pointer-tagging.md
+++ b/content/posts/pointer-tagging/index.md
diff --git a/syntax.sh b/syntax.sh
index 04141ae..0473d98 100755
--- a/syntax.sh
+++ b/syntax.sh
@@ -22,7 +22,9 @@ cat << EOF > $CSS
EOF
printf "\n/* Chroma style: %s */\n" $LIGHT >> $CSS
+printf "@media (prefers-color-scheme: light) {\n" >> $CSS
hugo gen chromastyles --style=$LIGHT >> $CSS
+printf "}\n" >> $CSS
printf "\n\n/* Chroma style: %s */\n" $DARK >> $CSS
printf "@media (prefers-color-scheme: dark) {\n" >> $CSS
hugo gen chromastyles --style=$DARK >> $CSS