Skip to content

Commit

Permalink
doc: add dark mode styles
Browse files Browse the repository at this point in the history
Pulled colors from nodejs.dev

Refs: nodejs#35793
  • Loading branch information
jabyrd3 committed Nov 28, 2020
1 parent 2999845 commit 04b1cb1
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
28 changes: 28 additions & 0 deletions doc/api_assets/hljs.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,31 @@
color: #666;
font-weight: lighter;
}

@media (prefers-color-scheme: dark) {
.hljs-symbol {
color: #f92672;
}
.hljs-attribute,
.hljs-keyword {
color: #66d9ef;
}
.hljs-string {
color: #99cc7d;
}
.hljs-regexp,
.hljs-number {
color: #dbbdf9;
}
.hljs-doctag {
color: #040404;
}
.hljs-doctag .hljs-type,
.hljs-doctag .hljs-variable,
.hljs-comment {
color: #8292a2;
}
.hljs-built_in {
color: #f5bc75;
}
}
16 changes: 16 additions & 0 deletions doc/api_assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -716,3 +716,19 @@ kbd {
overflow: hidden;
}
}
@media (prefers-color-scheme: dark) {
body {
background-color: #090c15;
color: #cbd4d9;
}
a:link {
color: #5fa04e;
}
#column2.interior, #column2 ul {
background-color: #0d111d;
}
pre,tt,code {
color: #e9edf0;
background-color: #2c3437;
}
}

0 comments on commit 04b1cb1

Please sign in to comment.