Skip to content

Instantly share code, notes, and snippets.

@andy0130tw
Created January 5, 2026 11:08
Show Gist options
  • Select an option

  • Save andy0130tw/e3fcecfa0069eeb959c240ec64236186 to your computer and use it in GitHub Desktop.

Select an option

Save andy0130tw/e3fcecfa0069eeb959c240ec64236186 to your computer and use it in GitHub Desktop.
Night mode for CodeMirror 6 docs
html, body {
color-scheme: dark;
background: #100F0F;
color: #CECDC3;
}
nav#toc a.current-section {
color: white;
}
h2 .keyword,
h3 .keyword,
h4 .keyword {
color: #CECDC3;
}
.cm-editor { color: black; background: white; }
#controls button { color: black; }
/* Code highlighting styles */
.tok-keyword, .fn, .keyword {color: #CE5D97;}
.tok-atom, .tok-bool {color: #205EA6;}
.tok-number, .prim {color: #879A39;}
.tok-variableName.tok-definition, .tok-attribute {color: #8B7EC8;}
.tok-variableName2, .tok-typeName, .type {color: #3171B2;}
.tok-comment {color: #AD8301;}
.tok-string, .string {color: #D14D41;}
.tok-string2 {color: #DA702C;}
.tok-meta {color: #999;}
.tok-tag {color: #879A39;}
.tok-invalid {color: #AF3029;}
a.blocklink:hover, nav a.active, a:link, a:visited {
color: #92BFDB;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment