Skip to content

Instantly share code, notes, and snippets.

@danielsamuels
Created April 29, 2020 15:39
Show Gist options
  • Save danielsamuels/705406f69097fbf3d192daeb83c6fc1a to your computer and use it in GitHub Desktop.
Save danielsamuels/705406f69097fbf3d192daeb83c6fc1a to your computer and use it in GitHub Desktop.
Dark mode stylesheet for docs.python.org
html,
body,
div.document,
div.body,
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6,
div.sphinxsidebar,
select,
form.inline-search input,
div.sphinxsidebar input {
background-color: #000;
color: #bfbfbf;
}
div.related,
.note code {
background-color: #111;
color: #aaa;
}
div.related a,
div.sphinxsidebar h3 a,
div.sphinxsidebar a,
.highlight .go,
code.descclassname,
code.descname {
color: #636363;
}
div.body a,
.highlight .nf,
.highlight .gt {
color: #0091c2;
}
code,
pre,
.deprecated {
background-color: #0f100d;
color: #aaa;
}
dt:target,
span.highlighted {
color: #000;
}
div.warning {
background-color: #1f1616;
}
.warning code {
background: #4e3f3f;
}
div.note {
background-color: #0e0e0e;
}
div.seealso {
background-color: #3a3a27;
}
table.docutils th {
background-color: #171717;
}
table.docutils td {
background-color: #383838;
}
dt:target {
background-color: #847410;
}
div#sidebarbutton {
background-color: #0f0f0f !important;
}
.highlight .gr {
color: #b30000;
}
.highlight .s1 {
color: #4070ce;
}
#outdated-warning {
background-color: #520000 !important;
color: #969696 !important;
}
div.sphinxsidebar a {
color: #318c78;
}
th,
dl.field-list > dt {
background-color: #5c2e5c;
}
div.sidebar {
background-color: #191a00;
}
.highlight .fm {
color: #0b49e5;
}
@ichisadashioko
Copy link

How are we suppose to use this?

@ichisadashioko
Copy link

This might be a good way to inject with the file raw URL.

function injectCSSFile(url){
    var head = document.getElementsByTagName('head')[0]
    var link = document.createElement('link')
    link.rel = 'stylesheet'
    link.type = 'text/css'
    link.href = url
    link.media = 'all'
    head.appendChild(link)
}
injectCSSFile('https://gist.githubusercontent.com/danielsamuels/705406f69097fbf3d192daeb83c6fc1a/raw/ad86f934279e0748e7a1ce544599e9572ebb8091/style.css')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment