Skip to content

Commit 146d170

Browse files
committed
Fix jupyter-sphinx css for dark mode
1 parent 33205e4 commit 146d170

File tree

1 file changed

+40
-32
lines changed

1 file changed

+40
-32
lines changed

src/doc/common/static/custom-jupyter-sphinx.css

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ body[data-theme="dark"] {
6363
background-color: black;
6464
}
6565

66+
.jupyter_container .highlight {
67+
background-color: black;
68+
}
69+
6670
.thebelab-button {
6771
color: #d0d0d0;
6872
background-color: #383838;
@@ -92,39 +96,43 @@ body[data-theme="dark"] {
9296
}
9397

9498
@media (prefers-color-scheme: dark) {
95-
body[data-theme="auto"] { /* the same styles with body[data-theme="dark"] */
96-
.jupyter_container {
97-
color: white;
98-
background-color: black;
99-
}
100-
101-
.thebelab-button {
102-
color: #d0d0d0;
103-
background-color: #383838;
104-
}
105-
106-
.thebelab-button:active {
107-
color: #368ce2;
108-
}
109-
110-
#thebelab-activate-button {
111-
background-color: #383838;
112-
}
113-
114-
#thebelab-activate-button:active {
115-
color: #368ce2;
116-
}
117-
118-
.thebelab-cell .jp-OutputArea-output {
119-
color: white;
120-
background-color: black;
121-
}
122-
123-
.thebelab-cell .jp-OutputArea-output pre {
124-
color: white;
125-
background-color: black;
126-
}
99+
body[data-theme="auto"] { /* the same styles with body[data-theme="dark"] */
100+
.jupyter_container {
101+
color: white;
102+
background-color: black;
103+
}
104+
105+
.jupyter_container .highlight {
106+
background-color: black;
107+
}
108+
109+
.thebelab-button {
110+
color: #d0d0d0;
111+
background-color: #383838;
112+
}
113+
114+
.thebelab-button:active {
115+
color: #368ce2;
116+
}
117+
118+
#thebelab-activate-button {
119+
background-color: #383838;
120+
}
121+
122+
#thebelab-activate-button:active {
123+
color: #368ce2;
124+
}
125+
126+
.thebelab-cell .jp-OutputArea-output {
127+
color: white;
128+
background-color: black;
129+
}
130+
131+
.thebelab-cell .jp-OutputArea-output pre {
132+
color: white;
133+
background-color: black;
127134
}
135+
}
128136
}
129137

130138

0 commit comments

Comments
 (0)