Skip to content

Instantly share code, notes, and snippets.

@Aiq0
Created February 14, 2023 17:56
Show Gist options
  • Save Aiq0/df0399cf50438721300c123f12ac3db5 to your computer and use it in GitHub Desktop.
Save Aiq0/df0399cf50438721300c123f12ac3db5 to your computer and use it in GitHub Desktop.

Dark mode for https://cplusplus.com/reference

To make it work, put the CSS into the styles of website.

In Firefox, you can do it, for example, by adding it to userContent.css in chrome folder in profile directory (you can find it by going to about:support):

@-moz-document domain("cplusplus.com") {
	/* paste code below here */
}

Or you can do it by some custom extension that injects CSS code (or JS code, that can inject CSS).

body {
background: #222 !important;
}
#I_nav {
background: #222 !important;
}
#I_main {
background-color: #222 !important;
color: #ccc !important;
}
.C_doc .C_prototype {
background: #1a1a1a !important;
}
.C_doc .C_prototype .even {
background: none !important;
}
.C_doc #parameters DT,
.C_doc #requirements DT {
background-color: #1a1a1a !important;
}
.auto .source {
background: #1a1a1a !important;
border: none !important;
border-radius: 0 8px 8px 0 !important;
}
.auto .source DFN {
color: #8c30b0 !important;
}
.auto .source KBD {
color: #cc2679 !important;
}
a {
color: #46f !important;
}
.C_CodeBox TABLE {
background: #111 !important;
border: none !important;
border-radius: 8px !important;
border-collapse: collapse !important;
}
.auto .output {
background: #1a1a1a !important;
border: none !important;
padding: 5px !important;
border-radius: 8px !important;
}
#I_nav .sect {
background-color: #1a1a1a !important;
border: none !important;
color: #aaa !important;
border-radius: 8px !important;
}
#I_nav .selected {
background-color: #111 !important;
color: #eee;
}
#I_nav A {
color: #aaa !important;
}
#I_nav H3 {
background-color: #111 !important;
border-radius: 8px 8px 0 0 !important;
}
#I_nav .pl {
border-left: 6px solid #888 !important;
}
#I_nav .mn {
border-top: 6px solid #888 !important;
}
#I_nav LI .C_Label {
background-color: #0a0a0a !important;
border: none !important;
height: 13px !important;
font-size: 10px !important;
padding: 2px !important;
}
#I_bar {
background: #1a1a1a !important;
border-top: none !important;
border-bottom: none !important;
}
.C_doc SECTION H3::before {
background-color: transparent !important;
}
.C_doc .C_prototype TH {
color: rgba(0, 128, 0, 0.5) !important;
}
.C_doc .links DT {
background-color: #111 !important;
border-radius: 8px 0 0 8px !important;
}
.C_doc .links {
border: none !important;
border-radius: 8px !important;
}
.C_doc .links DD {
border-left: none !important;
background-color: #1a1a1a !important;
border-radius: 0 8px 8px 0 !important;
}
.C_doc .links DT,
.C_doc .links DD {
padding: 3px !important;
}
.auto .source VAR {
color: #06f !important;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
address,
code,
del,
dfn,
em,
ins,
q,
samp,
strong,
b,
i,
hr,
dl,
dt,
dd,
ol,
fieldset,
legend,
label {
padding: 1px !important;
}
pre,
code,
tt,
samp,
var,
dfn,
cite,
kbd {
border-radius: 8px !important;
}
.C_doc H1 .namespace {
color: #5252D5 !important;
}
div.auto>table>tbody,
div.auto>table>tbody>tr,
.rownum,
.source {
border: none !important;
}
.C_shell {
display: none !important;
}
.gsc-input-box {
border: none !important;
background: #222 !important;
border-radius: 8px !important;
}
#I_search .gsc-input {
background: #222 !important;
color: #ddd !important;
border-radius: 8px !important;
}
.gsc-search-button-v2,
.gsc-search-button-v2:hover,
.gsc-search-button-v2:focus {
background-color: #222 !important;
border: none !important;
border-radius: 8px !important;
}
.gsc-search-button-v2 svg {
fill: #ddd !important;
}
body {
color: #aaa;
}
.C_SwitchCases li,
.C_SwitchCases div.on {
border: 1px solid #111 !important;
}
.C_SwitchCases li.on {
background: #1a1a1a !important;
border-bottom: none !important;
}
.C_SwitchCases li.off {
background: #111 !important;
}
TABLE.boxed TH {
background: #222 !important;
}
td,
th,
tr {
padding: 3px !important;
border-color: #222 !important;
}
dt {
border-radius: 8px !important;
padding: 3px !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment