Add GitHub light/dark mode image syntax (#3182)

diff --git a/lib/resources/styles.css b/lib/resources/styles.css
index f1059f6..3ebf36f 100644
--- a/lib/resources/styles.css
+++ b/lib/resources/styles.css
@@ -88,6 +88,18 @@
   cursor: pointer;
 }
 
+/*
+Only show images that fit their theme using GitHub's syntax, see:
+https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/
+*/
+.dark-theme img[src$="#gh-light-mode-only"] {
+  display: none;
+}
+
+.light-theme img[src$="#gh-dark-mode-only"] {
+  display: none;
+}
+
 /* for layout */
 html,
 body {