forked from proplot-dev/proplot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.css
More file actions
548 lines (514 loc) · 16.3 KB
/
Copy pathcustom.css
File metadata and controls
548 lines (514 loc) · 16.3 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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
/* This file contains edits to the RTD theme CSS style
* sheets. Requires a _templates/layout.html file.
* https://learn.shayhowe.com/advanced-html-css/complex-selectors/
* - item is tag e.g. <item></item>
* - #item is id e.g. <p id="item"></p>
* - .item is class e.g. <p class="item"></p>
* - item[key] or item[key=*] filters tags e.g. <item key="key"></item>
* - .item1.item2 {} matches tag belonging to *both* classes/ids
* - .item1 .item2 {} matches where item2 is *descendent* of item tag/class/id
* - .item1, .item2 {} matches tag belonging to *either* tag/class/id
* - item1:key {} matches "pseudo-class" e.g. item1:hover or "pseudo-element" e..g item1:first-line
* - item1 + item2 matches item2 *immediately following* item1, but not inside
* - default blue for header and links: 2f81b7
* - better blue used before: 2d6ab0
* Alabaster scroll sidebar: https://stackoverflow.com/a/57040610/4970632
* Rtd edits: https://stackoverflow.com/a/48281750/4970632
* Note we only use !important where RTD uses !important
* Otherwise just try to match specificity of RTD selectors
*/
/* Default light mode variables */
:root {
--dark-color: #404040; /* for toggle button */
--light-color: #f0f0f0; /* for toggle button */
--main-color: #404040;
--call-color: #606060;
--versions-color: #808080;
--highlight-color: #f1c40f;
--code-color: #e65820;
--link-color: #2d6ab0;
--link-hover-color: #0079ff;
--link-visited-color: #452bb0;
--code-border-color: #e0e0e0;
--menu-border-color: #909090;
--search-border-color: #aaa;
--search-shadow-color: #ddd;
--main-bg-color: #fcfcfc;
--code-bg-color: #ffffff;
--empty-bg-color: #f4f4f4;
--l1-bg-color: #e9e9e9;
--l2-bg-color: #dcdcdc;
--l3-bg-color: #d0d0d0;
--l4-bg-color: #c3c3c3;
--l5-bg-color: #b6b6b6;
--l6-bg-color: #a9a9a9;
--l7-bg-color: #9c9c9c;
--block-bg-color: #f4f4f4;
--accent-bg-color: #d0d0d0;
}
/* Dark mode variables */
/* See: https://dev.to/ananyaneogi/create-a-dark-light-mode-switch-with-css-variables-34l8 */
[data-theme="dark"] {
--main-color: #fcfcfc;
--call-color: #d0d0d0;
--versions-color: #b0b0b0;
--code-color: #ff8f4f;
--link-color: #69acff;
--highlight-color: #b27600;
--link-hover-color: #549aeb;
--link-visited-color: #c194ff;
--code-border-color: #606060;
--menu-border-color: #808080;
--search-border-color: #444;
--search-shadow-color: #333;
--main-bg-color: #202020;
--code-bg-color: #2a2a2a;
--empty-bg-color: #262626;
--l1-bg-color: #303030;
--l2-bg-color: #3c3c3c;
--l3-bg-color: #494949;
--l4-bg-color: #565656;
--l5-bg-color: #636363;
--l6-bg-color: #707070;
--l7-bg-color: #7c7c7c;
--block-bg-color: #2a2a2a;
--accent-bg-color: #505050;
}
/* Pydata theme font families, sizes, and weights */
/* Github text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; */
/* Pydata text: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; */
/* Pydata code: "fontSFMono-Regular", Menlo, Consolas, Monaco, "Liberation Mono", "Lucida Console", monospace; */
/* Note that pydata code settings seem to be unchaged compared to readthedocs */
body, legend, h1, h2, h3, h4, h5, h6, .rst-content .toctree-wrapper p.caption{
font-family: "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
legend, h1, h2, h3, h4, h5, h6, .rst-content .toctree-wrapper p.caption{
font-weight: 500;
}
/* Readjust font sizes */
/* Keep bold headers but slightly larger than RTD and smaller than pydata */
.rst-content div[class^='highlight'] pre,
.rst-content pre.literal-block,
.rst-content .linenodiv pre{
font-size: 13px;
}
body, p, .rst-content{
font-size: 15px;
}
h1{
font-size: 200%;
}
h2{
font-size: 180%;
}
h3{
font-size: 160%;
}
h4, .rst-content p.rubric{
font-size: 140%;
}
h5{
font-size: 120%;
}
h6{
font-size: 100%;
}
/* Menu bar headers */
.wy-menu-vertical header, .wy-menu-vertical p.caption {
font-size: 95%; /* default is 85% */
padding: 0 1.45em; /* fix alignment */
}
/* Menu bar items */
.wy-menu-vertical a {
padding: 0.4em 1.6em /* mostly unchanged */
}
/* Parameters and Returns headers */
.rst-content dl:not(.docutils) dt,
.rst-content dl:not(.docutils) .field-list>dt {
font-size: 100%; /* default is 90% */
}
/* RST content background color */
body.scroll-up,
body.scroll-down,
.wy-nav-content {
max-width: 860px;
background: var(--main-bg-color);
}
/* List item separation. Compare to paragraph break margin of 24px */
.rst-content li {
margin-bottom: 8px;
}
/* Sidebar text color, includes text-logo color for mobile */
/* and expansion buttons. Matches specificity of RTD sheet */
.wy-menu p.caption,
.wy-menu li.toctree-l1 a,
.wy-menu li.toctree-l2 a,
.wy-menu li.toctree-l3 a,
.wy-menu li.toctree-l4 a,
.wy-menu li.toctree-l1 a span.toctree-expand,
.wy-menu li.toctree-l2 a span.toctree-expand,
.wy-menu li.toctree-l3 a span.toctree-expand,
.wy-menu li.toctree-l1 a:hover span.toctree-expand,
.wy-menu li.toctree-l2 a:hover span.toctree-expand,
.wy-menu li.toctree-l3 a:hover span.toctree-expand,
.wy-nav-top .fa-bars {
color: var(--main-color);
}
/* Sidebar and background colors, the .wy-body-for-nav is rubber band scroll */
.wy-body-for-nav,
.wy-nav-content-wrap {
background: var(--empty-bg-color);
}
.wy-nav-side,
.wy-nav-top,
.wy-side-nav-search {
background: var(--l1-bg-color);
border-right: 0;
}
/* Sidebar level colors */
/* Matches specificity of RTD sheet */
.wy-menu li.toctree-l1>a:hover,
.wy-menu li.toctree-l1.current>a,
.wy-menu li.toctree-l1.current li.toctree-l2>a {
background: var(--l2-bg-color);
border-right: 0;
}
.wy-menu li.toctree-l1.current li.toctree-l2>a:hover,
.wy-menu li.toctree-l1.current li.toctree-l2.current>a,
.wy-menu li.toctree-l2.current li.toctree-l3>a {
background: var(--l3-bg-color);
border-right: 0;
}
.wy-menu li.toctree-l2.current li.toctree-l3>a:hover,
.wy-menu li.toctree-l2.current li.toctree-l3.current>a,
.wy-menu li.toctree-l3.current li.toctree-l4>a {
background: var(--l4-bg-color);
border-right: 0;
}
.wy-menu li.toctree-l3.current li.toctree-l4>a:hover,
.wy-menu li.toctree-l3.current li.toctree-l4.current>a,
.wy-menu li.toctree-l4.current li.toctree-l5>a {
background: var(--l5-bg-color);
border-right: 0;
}
/* Sidebar current item outline color */
.wy-menu li.toctree-l1.current>a {
border-top: solid 1px var(--l3-bg-color);
border-bottom: solid 1px var(--l3-bg-color);
}
.wy-menu li.toctree-l2.current>a {
border-top: solid 1px var(--l4-bg-color);
border-bottom: solid 1px var(--l4-bg-color);
}
.wy-menu li.toctree-l3.current>a {
border-top: solid 1px var(--l5-bg-color);
border-bottom: solid 1px var(--l5-bg-color);
}
.wy-menu li.toctree-l4.current>a {
border-top: solid 1px var(--l6-bg-color);
border-bottom: solid 1px var(--l6-bg-color);
}
.wy-menu li.toctree-l5.current>a {
border-top: solid 1px var(--l7-bg-color);
border-bottom: solid 1px var(--l7-bg-color);
}
/* Hide sidebar expansion button when not on current item */
/* Stop doing this (cannot re-expand after collapsing) */
/* .wy-menu li.toctree-l1:not(.current) a span.toctree-expand,
* .wy-menu li.toctree-l2:not(.current) a span.toctree-expand,
* .wy-menu li.toctree-l3:not(.current) a span.toctree-expand,
* .wy-menu li.toctree-l1:not(.current) a:hover span.toctree-expand,
* .wy-menu li.toctree-l2:not(.current) a:hover span.toctree-expand,
* .wy-menu li.toctree-l3:not(.current) a:hover span.toctree-expand {
* display: none;
* } */
/* Sidebar logo flush in box */
/* Also remove bottom margins because TOC caption padding is enough */
.wy-side-nav-search .wy-dropdown>a img.logo,
.wy-side-nav-search>a img.logo,
.wy-side-nav-search .wy-dropdown>a,
.wy-side-nav-search>a {
padding: 0;
}
.wy-side-nav-search input[type=text] {
color: var(--main-color);
border: 1px solid var(--search-border-color);
box-shadow: inset 0 1px 3px var(--main-bg-color);
background-color: var(--main-bg-color);
/* border-color: var(--search-border-color); */
}
.wy-side-nav-search {
margin-bottom: 0;
padding-bottom: 0;
border-color: var(--search-border-color);
background-color: var(--l1-bg-color);
/* box-shadow-color: var(--search-shadow-color); */
}
/* Code block color. dl:not(.docutils) needed below to match specificity */
/* Previously included border but have removed this to match Pydata theme */
code,
.rst-content tt,
.rst-content code {
border: 0;
padding: 0;
background: transparent;
font-size: 87.5%;
/* border: solid 1px var(--code-border-color); */
/* background: var(--code-bg-color); */
/* font-size: 75%; */
}
.rst-content tt.literal,
.rst-content code.literal,
.rst-content dl:not(.docutils) code.literal,
.rst-content dl:not(.docutils) tt.literal {
color: var(--code-color);
font-weight: normal;
}
/* Nbsphinx cells. Do not inherit main text color */
/* Need !important because nbshpinx hardcodes <style> into HTML */
/* Can also use this to sync code-block and nbinput backgrounds but probably
* better if they have different colors. */
.rst-content div:not(.stderr)>div[class^='highlight'],
.rst-content div.nbinput>div.input_area,
.rst-content pre.literal-block {
color: var(--main-color) !important;
border-radius: 0 !important;
border-color: var(--code-border-color) !important;
background-color: var(--code-bg-color) !important;
}
.rst-content div.nboutput>div.output_area:not(.stderr) {
padding-left: 0;
}
.rst-content div.nboutput>div.output_area:not(.stderr)>div.highlight {
color: var(--main-color) !important;
background-color: var(--main-bg-color) !important;
}
.rst-content div.nboutput>div.output_area.stderr>div.highlight {
color: #444 !important;
}
.rst-content div.nboutput>div.output_area.stderr {
background-color: #fdd !important;
}
/* Do not use scrollbar in nbsphinx figure output areas */
/* Interrupts vertical scrolling through document and nbsphinx makes */
/* enough vertical space already (scroll bar adds 2 pixels of scrolling) */
.rst-content div.nboutput>div.output_area {
overflow: hidden !important;
}
/* Nbsphinx prompt */
.rst-content div.nbinput>div.prompt>div.highlight,
.rst-content div.nboutput>div.prompt>div.highlight {
background-color: var(--main-bg-color) !important;
}
.rst-content div.nbinput>div.prompt>div.highlight>pre {
color: var(--link-color) !important;
}
.rst-content div.nboutput>div.prompt>div.highlight>pre {
color: var(--code-color) !important;
}
/* Parameters and Returns header colors */
.rst-content dl:not(.docutils) .field-list>dt {
color: var(--main-color);
font-weight: bold;
background: var(--block-bg-color);
border-left-color: var(--accent-bg-color);
/* padding: 0; /* remove accents, decided against this */
/* border: 0; /* remove accents, decided against this */
}
/* Parameter table colors */
.rst-content tt.xref.docutils.literal,
.rst-content code.xref.docutils.literal {
color: var(--main-color);
font-weight: bold;
}
/* Call signature headers to grayscale */
body,
.rst-content dl:not(.docutils) dt .headerlink,
.rst-content dl:not(.docutils) dt .property,
.rst-content dl:not(.docutils) dt .descname,
.rst-content dl:not(.docutils) dt .descclassname {
color: var(--main-color);
}
.rst-content dl:not(.docutils) dt {
color: var(--call-color);
background: var(--block-bg-color);
border-top-color: var(--accent-bg-color);
}
/* "Admonition" blocks, i.e. note, todo, etc. */
.rst-content .admonition,
.rst-content dl:not(.docutils) .admonition {
background: var(--block-bg-color);
}
.rst-content .admonition>.admonition-title,
.rst-content dl:not(.docutils) .admonition>.admonition-title {
color: var(--main-color); /* title text is same as block bg */
background: var(--accent-bg-color);
}
/* Remove bottom margin for paragraph elements in tables */
.wy-table thead p,
.rst-content table p,
.rst-content table.docutils thead p,
.rst-content table.field-list thead p {
margin-bottom: 0 !important;
}
/* Disable scrolling in special tables */
/* .wy-table-responsive table td { */
.proplot-rctable td {
white-space: normal !important;
}
/* Table rows */
.wy-table-odd td,
.wy-table-striped tr:nth-child(2n-1) td,
.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
background: var(--block-bg-color);
}
.wy-table-even td,
.wy-table-striped tr:nth-child(2n) td,
.rst-content table.docutils:not(.field-list) tr:nth-child(2n) td {
background: var(--main-bg-color);
}
/* Table borders */
.wy-table-bordered-all,
.rst-content table.docutils,
.wy-table-bordered-all td,
.rst-content table.docutils td {
border: 1px solid var(--accent-bg-color);
/* border-color: var(--accent-bg-color); */
}
/* Table header color */
.wy-table thead,
.rst-content table.docutils thead,
.rst-content table.field-list thead {
color: var(--main-color);
background: var(--main-bg-color);
}
/* Hyperlink and API link color */
a,
.rst-content a code.xref.docutils.literal,
.rst-content a tt.xref.docutils.literal {
color: var(--link-color);
}
a:hover,
.rst-content a:hover code.xref.docutils.literal,
.rst-content a:hover tt.xref.docutils.literal {
color: var(--link-hover-color);
}
a:visited,
.rst-content a:visited code.xref.docutils.literal,
.rst-content a:visited tt.xref.docutils.literal {
color: var(--link-visited-color);
}
/* MathJax color */
span[id*='MathJax-Span'] {
color: var(--main-color);
}
/* Search text highlighting color */
.rst-content .highlighted {
padding: 0;
background-color: var(--highlight-color);
}
/* Horizontal rule colors */
hr {
color: var(--code-border-color);
}
/* RTD versions box colors */
.rst-versions .rst-current-version {
padding: 0.66em; /* match padding for list items */
color: var(--versions-color);
background-color: var(--l3-bg-color);
border-top: solid 1px var(--l5-bg-color);
border-bottom: solid 1px var(--l5-bg-color);
}
.rst-versions .rst-other-versions {
color: var(--versions-color);
background-color: var(--l3-bg-color);
}
.rst-versions .rst-other-versions hr {
color: var(--l5-bg-color);
border-top-color: var(--l5-bg-color);
border-bottom-color: var(--l5-bg-color);
}
.rst-versions .rst-current-version .fa {
color: var(--main-color);
}
.rst-versions .rst-other-versions dd a {
color: var(--main-color);
}
/* Make entire sidebar scrollable but add empty space to the bottom
* of the colling region, rather than truncating the scrollable space */
/*
* nav.wy-nav-side .ethical-rtd {
* margin-bottom: 3em !important; #<{(| padding below ad or below sidebar |)}>#
* }
* nav.wy-nav-side {
* padding-bottom: 0em !important; #<{(| entire sidebar is always scrollable |)}>#
* }
*/
/* Next and previous buttons */
.btn {
border: 1px solid var(--block-color);
transition: all 0.1s linear;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
}
.btn-neutral,
.btn-neutral:hover,
.btn-neutral:visited {
color: var(--main-color) !important;
}
.btn-neutral {
background-color: var(--block-bg-color) !important;
}
.btn-neutral:hover {
background-color: var(--accent-bg-color) !important;
}
/* Hide Edit on Github block */
.wy-breadcrumbs li.wy-breadcrumbs-aside a {
display: None;
}
/* Dark mode toggle switcher */
/* See: https://dev.to/ananyaneogi/create-a-dark-light-mode-switch-with-css-variables-34l8 */
/* Color changes cannot be in :before tag or they won't apply to padding */
#lightdark-li {
float: right;
}
#lightdark-label {
border: 0;
margin: 0;
padding: 0;
font-size: 100%;
}
#lightdark-label input {
display: none; /* hides the check box */
}
#lightdark-label div.btn-neutral {
padding: 0;
margin-left: 5px;
border-width: 5px;
border-style: solid;
border-radius: 2px;
cursor: pointer;
transition: all 0.1s linear;
overflow: hidden;
}
#lightdark-label:hover div.btn-neutral,
#lightdark-label input:checked + div.btn-neutral {
color: var(--light-color) !important;
border-color: var(--dark-color) !important;
background-color: var(--dark-color) !important;
}
#lightdark-label div.btn-neutral,
#lightdark-label:hover input:checked + div.btn-neutral {
color: var(--dark-color) !important;
border-color: var(--light-color) !important;
background-color: var(--light-color) !important;
}
#lightdark-label:hover div.btn-neutral:before,
#lightdark-label input:checked + div.btn-neutral:before {
content: "Dark mode";
}
#lightdark-label div.btn-neutral:before,
#lightdark-label:hover input:checked + div.btn-neutral:before {
content: "Light mode";
}