-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathcustom.css
More file actions
259 lines (246 loc) · 6.8 KB
/
Copy pathcustom.css
File metadata and controls
259 lines (246 loc) · 6.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
/*
* custom.css — sphinxawesome_theme compatible
*
* NOTE: This file must NOT use --pst-color-* variables or .bd-* selectors.
* Those belong to pydata-sphinx-theme / sphinx-book-theme and do not exist
* here. All overrides use standard CSS selectors or sphinxawesome variables.
*/
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap");
/* ── Monospace font for all code ─────────────────────────────────────────── */
code,
kbd,
samp,
pre,
.highlight pre,
tt.literal,
code.literal {
font-family:
"JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono", "Consolas",
monospace;
}
/* ── Code block sizing and shape ─────────────────────────────────────────── */
/* Single border lives on pre; div.highlight only clips the radius. */
div.highlight {
border-radius: 8px;
overflow: hidden;
}
.highlight pre {
font-size: 0.9rem;
line-height: 1.65;
border-radius: 8px;
border: 1px solid #d0d7de; /* override theme.css's var(--color-border) */
margin-top: 0; /* theme adds a large top-margin — reset it */
padding: 1rem 1.25rem;
font-feature-settings:
"liga" 1,
"calt" 1;
}
html[data-theme="dark"] .highlight pre {
border-color: #30363d;
}
/* Inline code */
code.literal,
p code,
li code,
td code {
font-family: "JetBrains Mono", "Fira Code", "SF Mono", "Consolas", monospace;
font-size: 0.82em;
border-radius: 4px;
padding: 0.15em 0.4em;
background: #f3f4f6;
border: 1px solid #e2e4e8;
color: #c2185b;
}
html[data-theme="dark"] code.literal,
html[data-theme="dark"] p code,
html[data-theme="dark"] li code,
html[data-theme="dark"] td code {
background: #161b22;
border-color: #30363d;
color: #ff7b72;
}
/* ── Syntax highlighting — light palette (GitHub-inspired) ──────────────── */
/* keywords: blue │ strings: green │ fn/class defs: purple */
/* comments: gray │ numbers: blue │ variable names: neutral (no colour) */
div.highlight,
.highlight pre {
background: #f6f8fa;
color: #24292f;
}
/* def, class, import, from, if, return, for, … → blue */
.highlight .k,
.highlight .kn,
.highlight .kd,
.highlight .kr,
.highlight .kc,
.highlight .kw {
color: #0550ae;
font-weight: 600;
}
/* string literals → green */
.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .sa,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .se,
.highlight .si,
.highlight .sh {
color: #116329;
}
/* numbers → blue */
.highlight .mi,
.highlight .mf,
.highlight .mh,
.highlight .mo {
color: #0550ae;
}
/* function names in definitions → purple */
.highlight .nf,
.highlight .fm {
color: #8250df;
}
/* class names in definitions → purple */
.highlight .nc {
color: #8250df;
font-weight: 600;
}
/* decorators (@property, @staticmethod, …) → purple */
.highlight .nd {
color: #8250df;
}
/* builtins (print, len, range, …) → blue */
.highlight .nb,
.highlight .bp {
color: #0969da;
}
/* namespace / module names → neutral */
.highlight .nn {
color: #24292f;
}
/* operators → neutral */
.highlight .o,
.highlight .ow {
color: #24292f;
}
/* comments → gray italic */
.highlight .c,
.highlight .c1,
.highlight .cm,
.highlight .cs,
.highlight .cp {
color: #6e7781;
font-style: italic;
}
/* variable / param names → NEUTRAL (no colour; avoid painting everything) */
.highlight .n,
.highlight .na,
.highlight .nv,
.highlight .py,
.highlight .p {
color: #24292f;
}
/* ── Syntax highlighting — dark palette (GitHub Dark) ──────────────────── */
html[data-theme="dark"] div.highlight,
html[data-theme="dark"] .highlight pre {
background: #0d1117;
color: #e6edf3;
}
/* keywords → blue */
html[data-theme="dark"] .highlight .k,
html[data-theme="dark"] .highlight .kn,
html[data-theme="dark"] .highlight .kd,
html[data-theme="dark"] .highlight .kr,
html[data-theme="dark"] .highlight .kc,
html[data-theme="dark"] .highlight .kw {
color: #79c0ff;
font-weight: 600;
}
/* strings → green */
html[data-theme="dark"] .highlight .s,
html[data-theme="dark"] .highlight .s1,
html[data-theme="dark"] .highlight .s2,
html[data-theme="dark"] .highlight .sa,
html[data-theme="dark"] .highlight .se,
html[data-theme="dark"] .highlight .si,
html[data-theme="dark"] .highlight .sh {
color: #7ee787;
}
/* numbers → blue */
html[data-theme="dark"] .highlight .mi,
html[data-theme="dark"] .highlight .mf,
html[data-theme="dark"] .highlight .mh {
color: #79c0ff;
}
/* function names → purple */
html[data-theme="dark"] .highlight .nf,
html[data-theme="dark"] .highlight .fm {
color: #d2a8ff;
}
/* class names → purple */
html[data-theme="dark"] .highlight .nc {
color: #d2a8ff;
font-weight: 600;
}
/* decorators → purple */
html[data-theme="dark"] .highlight .nd {
color: #d2a8ff;
}
/* builtins → blue */
html[data-theme="dark"] .highlight .nb,
html[data-theme="dark"] .highlight .bp {
color: #79c0ff;
}
/* namespace names → neutral */
html[data-theme="dark"] .highlight .nn {
color: #e6edf3;
}
/* operators → neutral */
html[data-theme="dark"] .highlight .o,
html[data-theme="dark"] .highlight .ow {
color: #e6edf3;
}
/* comments → gray */
html[data-theme="dark"] .highlight .c,
html[data-theme="dark"] .highlight .c1,
html[data-theme="dark"] .highlight .cm,
html[data-theme="dark"] .highlight .cp {
color: #8b949e;
font-style: italic;
}
/* variable / param names → NEUTRAL */
html[data-theme="dark"] .highlight .n,
html[data-theme="dark"] .highlight .na,
html[data-theme="dark"] .highlight .nv,
html[data-theme="dark"] .highlight .py,
html[data-theme="dark"] .highlight .p {
color: #e6edf3;
}
/* ── Sidebar nav section separators ─────────────────────────────────────── */
/* All p.caption elements are flat siblings inside a single <nav>. */
/* The ~ combinator targets every caption that follows the first one, */
/* adding a hairline rule above it without an orphan border at the top. */
#left-sidebar nav p.caption ~ p.caption {
border-top: 1px solid #d0d7de;
padding-top: 0.85rem;
margin-top: 0.5rem;
}
html[data-theme="dark"] #left-sidebar nav p.caption ~ p.caption {
border-top-color: #30363d;
}
/* ── List item spacing — Tailwind prose adds too much gap ────────────────── */
/* Scoped to #content so sidebar/nav lists are unaffected */
#content ul li,
#content ol li {
margin-top: 0.2rem;
margin-bottom: 0.2rem;
line-height: 1.55;
}
/* Numpydoc field lists (Parameters, Returns, etc.) */
#content dl > dd > ul li,
#content dl > dd > ol li {
margin-top: 0.1rem;
margin-bottom: 0.1rem;
}