Skip to content

Commit 9a5c682

Browse files
committed
docs: Fix CSS for dark mode code blocks again again (see #4085)
1 parent e7eeea1 commit 9a5c682

File tree

1 file changed

+43
-18
lines changed

1 file changed

+43
-18
lines changed

docs/assets/css/style.scss

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,55 +50,80 @@ a:hover {
5050

5151
/* Dark mode support */
5252
@media (prefers-color-scheme: dark) {
53-
body {
54-
background-color: #1a1a1a;
55-
color: #e0e0e0;
53+
body,
54+
.wrapper {
55+
background-color: #1a1a1a !important;
56+
color: #d0d0d0 !important;
57+
}
58+
59+
header,
60+
section {
61+
background-color: #1a1a1a !important;
5662
}
5763

5864
a {
59-
color: #6db3f2;
65+
color: #6db3f2 !important;
6066
}
6167

6268
a:hover {
63-
color: #9dcbf5;
69+
color: #9dcbf5 !important;
6470
}
6571

6672
h1, h2, h3, h4, h5, h6 {
67-
color: #f0f0f0;
73+
color: #f0f0f0 !important;
74+
border-bottom-color: #444 !important;
6875
}
6976

77+
/* Inline code */
7078
code {
71-
background-color: #3a3a3a !important;
72-
color: #e8e8e8 !important;
73-
border: 1px solid #555 !important;
79+
background-color: #2a2a2a !important;
80+
color: #f0a050 !important;
81+
border: none !important;
82+
border-radius: 3px !important;
7483
}
7584

85+
/* Code blocks */
7686
pre {
77-
background-color: #2d2d2d !important;
78-
border: 1px solid #444 !important;
87+
background-color: #252525 !important;
88+
border: 1px solid #3a3a3a !important;
89+
color: #d0d0d0 !important;
7990
}
8091

8192
pre code {
8293
background-color: transparent !important;
83-
border: none !important;
84-
color: #e0e0e0 !important;
94+
color: #d0d0d0 !important;
8595
}
8696

8797
blockquote {
88-
border-left-color: #555;
89-
color: #b0b0b0;
98+
border-left-color: #555 !important;
99+
color: #a0a0a0 !important;
90100
}
91101

92102
hr {
93-
border-color: #444;
103+
border-color: #444 !important;
104+
background-color: #444 !important;
94105
}
95106

96107
table th,
97108
table td {
98-
border-color: #444;
109+
border-color: #444 !important;
110+
}
111+
112+
table th {
113+
background-color: #2a2a2a !important;
99114
}
100115

101116
table tr:nth-child(even) {
102-
background-color: #252525;
117+
background-color: #222 !important;
118+
}
119+
120+
/* Lists */
121+
ul, ol, li {
122+
color: #d0d0d0 !important;
123+
}
124+
125+
/* Strong/bold */
126+
strong, b {
127+
color: #e8e8e8 !important;
103128
}
104129
}

0 commit comments

Comments
 (0)