Repository navigation
Expand file tree
/
Copy pathcustom.css
More file actions
151 lines (140 loc) · 5.7 KB
/
Copy pathcustom.css
File metadata and controls
151 lines (140 loc) · 5.7 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
/* Figure styling for the mermaid diagrams gen.py emits. The web edition uses a
dark mermaid palette (see mermaid-init.js), so the diagrams sit directly on the
dark page with no card, blending in rather than floating on a white box. */
pre.mermaid {
display: flex;
justify-content: center;
background: transparent;
padding: 14px 10px;
margin: 1em 0 0.4em 0;
}
figure {
margin: 1.5em 0;
}
figure > figcaption {
font-size: 0.85em;
font-style: italic;
opacity: 0.8;
text-align: center;
margin-top: 0.5em;
}
/* Per-theme palette. mdBook ships five themes: light and rust read as light
pages; coal, navy, and ayu are dark. Seagreen links and a syntax-highlight
palette are defined per group so the colours stay legible on either background
and keep the guide on the project's palette across a theme switch. */
.light, .rust {
--links: #2e6b69;
--sidebar-active: #2e6b69;
--search-mark-bg: #e0a33a;
--hl-comment: #6e7b73; --hl-keyword: #2e6b69; --hl-type: #9a5b16;
--hl-string: #a8410f; --hl-number: #4c52c4; --hl-title: #1f5d80; --hl-meta: #8a7f6d;
}
.coal, .navy, .ayu {
--links: #5fb3a8;
--sidebar-active: #5fb3a8;
--search-mark-bg: #b9842f;
--hl-comment: #8a9590; --hl-keyword: #5fb3a8; --hl-type: #d9a44a;
--hl-string: #e08a5b; --hl-number: #9b91f0; --hl-title: #6fa8c9; --hl-meta: #9a8f7d;
}
/* The guide is locked to coal, whose defaults carry a cool teal tint (hsl 200) in
the page, table, and quote backgrounds. Retune them to the same neutral dark
gray the landing page uses (--bg #17191b) so the two read as one design: dark
gray with seagreen accents, not dark teal. The sidebar's #292c2f is already
neutral, so it stays. */
.coal {
--bg: #17191b;
--table-alternate-bg: #1e2123;
--table-header-bg: #2a2e30;
--quote-bg: #1f2224;
}
/* The book title is thin (font-weight 200) and dim on the dark theme; brighten
and slightly thicken it so it reads clearly. */
#menu-bar .menu-title { font-weight: 400; color: #d8ded6; }
/* "Home" link, placed in the menu bar's left buttons by home-link.js; back to the
ANEForge landing page. Sized up and in the seagreen link colour so it reads as a
navigation action. */
.home-link {
display: inline-flex;
align-items: center;
height: 50px;
padding: 0 14px;
font-family: "Source Code Pro", ui-monospace, monospace;
font-size: 1.6rem; /* mdBook's root is 62.5%, so 1.6rem = 16px */
font-weight: 600;
color: var(--links);
text-decoration: none;
white-space: nowrap;
}
.home-link:hover { color: #8fd0c5; }
/* "Download PDF" action in the menu bar, placed by home-link.js. Rendered as a
filled seagreen pill (label + icon) so it reads as a clear call to action
rather than a dim icon. Margin centres the 32px pill in the 50px menu bar. */
#pdf-button {
display: inline-flex;
align-items: center;
gap: 8px;
height: 32px;
margin: 9px 8px;
padding: 0 14px;
border-radius: 6px;
background: var(--links);
color: #0f1513;
font-family: "Source Sans Pro", system-ui, sans-serif;
font-size: 1.4rem;
font-weight: 600;
text-decoration: none;
white-space: nowrap;
}
#pdf-button:hover { background: #8fd0c5; color: #0f1513; }
#pdf-button .fa { font-size: 1.5rem; }
/* Hide mdBook's auto-generated sidebar chapter number. The labels carry the real
chapter number (which gen.py keeps), and mdBook's own count includes the
provenance files, so its number drifts from the headings and cross-references. */
.sidebar .chapter strong[aria-hidden="true"] { display: none; }
/* The guide is locked to the dark theme, so hide the theme picker. */
#theme-toggle, #theme-list, .theme-popup { display: none !important; }
/* Syntax highlighting, coloured from the per-theme variables above. Applies to
highlight.js token spans: mdBook's own for C/Python/Swift, and the ones
highlight-extra.js adds for the pseudocode, MLIR, and FlatBuffers listings. */
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-keyword, .hljs-selector-tag,
.hljs-literal, .hljs-doctag { color: var(--hl-keyword); font-weight: 600; }
.hljs-built_in, .hljs-type,
.hljs-title.class_, .hljs-class .hljs-title { color: var(--hl-type); }
.hljs-string, .hljs-symbol, .hljs-bullet,
.hljs-regexp, .hljs-meta-string { color: var(--hl-string); }
.hljs-number { color: var(--hl-number); }
.hljs-title, .hljs-title.function_,
.hljs-section, .hljs-name { color: var(--hl-title); }
.hljs-attr, .hljs-attribute, .hljs-variable,
.hljs-template-variable, .hljs-property { color: var(--hl-title); }
.hljs-meta { color: var(--hl-meta); }
.hljs-deletion { color: #c0563a; }
.hljs-addition { color: #4f9e63; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }
/* Chapter opening summary: the blockquote immediately after the chapter title.
The source leaves it unlabeled; box it and add a SUMMARY
eyebrow here so it reads as a chapter summary rather than a quotation. The
selector matches only the blockquote adjacent to a title, so the bold-led
callouts elsewhere in the body are untouched. */
.content h1 + blockquote {
border: none;
border-left: 3px solid var(--links);
border-radius: 0 4px 4px 0;
background: var(--quote-bg);
padding: 0.6em 1em 0.75em;
margin: 1.1em 0 1.7em;
font-style: normal;
}
.content h1 + blockquote::before {
content: "Summary";
display: block;
font-family: "Source Sans Pro", system-ui, sans-serif;
font-size: 0.72em;
font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--links);
margin-bottom: 0.4em;
}