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
|
/* slosh docs. One file, no build step, no framework.
*
* The colours are the session's own default theme, so the docs look like the
* thing they document. Dark by default; the light variant follows the reader's
* system preference rather than a toggle nobody would find. */
:root {
--bg: #141418;
--panel: #17171c;
--line: #26262d;
--ink: #d8d8dd;
--dim: #8a8a95;
--accent: #ff5fd7;
--code-bg: #1c1c22;
--mono: ui-monospace, "SF Mono", "JetBrains Mono", "DejaVu Sans Mono", monospace;
--sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: light) {
:root {
--bg: #fdfdfc; --panel: #f6f6f4; --line: #e3e3df;
--ink: #26262a; --dim: #6b6b72; --code-bg: #f1f1ee;
}
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font: 16px/1.65 var(--sans);
-webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* ---- frame ---- */
header {
position: sticky; top: 0; z-index: 3;
display: flex; align-items: center; gap: 12px;
height: 48px; padding: 0 20px;
background: color-mix(in srgb, var(--bg) 86%, transparent);
backdrop-filter: blur(8px);
border-bottom: 1px solid var(--line);
}
header > a { font-family: var(--mono); font-weight: 600; color: var(--ink); }
header .crumb { color: var(--dim); font-size: 13px; }
header .crumb::before { content: "/ "; }
/* The way back out: docs live under the site, and the header is the one
* surface every page shares. Absolute, so a locally rendered build/docs
* points somewhere real too. */
header .home {
margin-left: auto;
color: var(--dim); font: 500 13px var(--mono);
}
header .home:hover { color: var(--ink); }
.burger { display: none; cursor: pointer; color: var(--dim); font-size: 20px; }
.wrap {
display: grid;
grid-template-columns: 232px minmax(0, 1fr) 200px;
gap: 40px;
max-width: 1180px;
margin: 0 auto;
padding: 32px 20px 96px;
}
/* ---- sidebar ---- */
.side { position: sticky; top: 80px; align-self: start; font-size: 14.5px; }
.side .brand { display: none; }
.side h6 {
margin: 20px 0 6px;
font: 600 11px/1 var(--sans);
letter-spacing: .09em;
text-transform: uppercase;
color: var(--dim);
}
.side h6:first-of-type { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { margin: 1px 0; }
.side a {
display: block; padding: 4px 10px; border-radius: 6px;
color: var(--ink); opacity: .78;
}
.side a:hover { background: var(--panel); opacity: 1; text-decoration: none; }
.side a.here {
background: var(--panel); opacity: 1; font-weight: 600;
box-shadow: inset 2px 0 0 var(--accent);
}
/* ---- on this page ---- */
.toc { position: sticky; top: 80px; align-self: start; font-size: 13px; }
.toc h6 {
margin: 0 0 8px; font: 600 11px/1 var(--sans);
letter-spacing: .09em; text-transform: uppercase; color: var(--dim);
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { color: var(--dim); display: block; padding: 3px 0; }
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc .l3 { padding-left: 12px; }
/* ---- prose ---- */
main { min-width: 0; }
main > :first-child { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.25; scroll-margin-top: 72px; }
h1 { font-size: 30px; margin: 0 0 18px; letter-spacing: -.01em; }
h2 {
font-size: 21px; margin: 40px 0 12px;
padding-top: 20px; border-top: 1px solid var(--line);
}
h3 { font-size: 17px; margin: 26px 0 8px; }
h4 { font-size: 15px; margin: 22px 0 6px; color: var(--dim); }
.anchor {
margin-left: 8px; color: var(--line);
font-weight: 400; opacity: 0; transition: opacity .1s;
}
h1:hover .anchor, h2:hover .anchor, h3:hover .anchor, h4:hover .anchor { opacity: 1; }
.anchor:hover { color: var(--accent); text-decoration: none; }
p, ul, ol, table, blockquote, pre { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
li > ul, li > ol { margin: 4px 0; }
code {
font: .875em/1.4 var(--mono);
background: var(--code-bg);
border: 1px solid var(--line);
border-radius: 4px;
padding: .1em .35em;
}
pre {
background: var(--code-bg);
border: 1px solid var(--line);
border-radius: 8px;
padding: 14px 16px;
overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.55; }
/* Terminal art: box-drawing joins only when the leading is tight and the font
* draws the pieces edge to edge. DejaVu first because it does, and because it
* is the monospace almost every Linux box already has. */
pre.art code {
font-family: "DejaVu Sans Mono", Menlo, Consolas, var(--mono);
line-height: 1.05;
letter-spacing: 0;
font-size: 12.5px;
}
blockquote {
margin-left: 0; padding: 2px 0 2px 16px;
border-left: 2px solid var(--accent);
color: var(--dim);
}
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
tbody tr:hover { background: var(--panel); }
td code { white-space: nowrap; }
/* ---- prev/next ---- */
.prevnext {
display: flex; justify-content: space-between; gap: 16px;
margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line);
font-size: 14.5px;
}
.prevnext .next { margin-left: auto; }
/* ---- narrow ---- */
@media (max-width: 1040px) { .toc { display: none; } .wrap { grid-template-columns: 232px minmax(0, 1fr); } }
@media (max-width: 760px) {
.burger { display: block; }
.wrap { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
.side {
display: none; position: fixed; top: 48px; left: 0; right: 0; z-index: 2;
/* An explicit height rather than `bottom: 0`. Taken out of flow it is still
* a grid child, and Chrome keeps its content height, which leaves the page
* showing through under the open menu. */
height: calc(100vh - 48px);
padding: 20px; overflow-y: auto; background: var(--bg);
border-right: 1px solid var(--line);
}
#menu:checked ~ .wrap .side { display: block; }
}
|