1/* Base styles and content styles */
2
3@import "variables.css";
4
5:root {
6 /* Browser default font-size is 16px, this way 1 rem = 10px */
7 font-size: 62.5%;
8 color-scheme: var(--color-scheme);
9}
10
11html {
12 font-family: var(--font);
13 color: var(--fg);
14 background-color: var(--bg);
15 text-size-adjust: none;
16 -webkit-text-size-adjust: none;
17
18 text-rendering: geometricPrecision !important;
19 -webkit-font-smoothing: antialiased !important;
20 text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.005);
21}
22
23body {
24 margin: 0;
25 font-size: 1.6rem;
26 overflow-x: hidden;
27}
28
29code {
30 font-family: var(--mono-font) !important;
31 font-size: var(--code-font-size);
32 direction: ltr !important;
33}
34
35/* make long words/inline code not x overflow */
36main {
37 overflow-wrap: break-word;
38}
39
40/* make wide tables scroll if they overflow */
41.table-wrapper {
42 overflow-x: auto;
43}
44
45h1,
46h2,
47h3,
48h4,
49h5,
50h6 {
51 font-family: var(--title-font);
52 font-weight: 480;
53 color: var(--title-color);
54}
55
56/* Don't change font size in headers. */
57h1 code,
58h2 code,
59h3 code,
60h4 code,
61h5 code,
62h6 code {
63 font-size: unset;
64}
65
66.left {
67 float: left;
68}
69.right {
70 float: right;
71}
72.boring {
73 opacity: 0.6;
74}
75.hide-boring .boring {
76 display: none;
77}
78.hidden {
79 display: none !important;
80}
81
82h2 {
83 padding-bottom: 1rem;
84 border-bottom: 1px solid;
85 border-color: var(--border-light);
86}
87
88h2,
89h3 {
90 margin-block-start: 1.5em;
91 margin-block-end: 0;
92}
93h4,
94h5 {
95 margin-block-start: 2em;
96}
97
98.header + .header h3,
99.header + .header h4,
100.header + .header h5 {
101 margin-block-start: 1em;
102}
103
104h1:target::before,
105h2:target::before,
106h3:target::before,
107h4:target::before,
108h5:target::before,
109h6:target::before {
110 display: inline-block;
111 content: "ยป";
112 margin-inline-start: -30px;
113 width: 30px;
114}
115
116/* This is broken on Safari as of version 14, but is fixed
117 in Safari Technology Preview 117 which I think will be Safari 14.2.
118 https://bugs.webkit.org/show_bug.cgi?id=218076
119*/
120:target {
121 /* Safari does not support logical properties */
122 scroll-margin-top: calc(var(--menu-bar-height) + 2rem);
123}
124
125.page {
126 outline: 0;
127 padding: 0 var(--page-padding);
128 margin-block-start: calc(
129 0px - var(--menu-bar-height)
130 ); /* Compensate for the #menu-bar-hover-placeholder */
131}
132.page-wrapper {
133 box-sizing: border-box;
134 background-color: var(--bg);
135}
136.no-js .page-wrapper,
137.js:not(.sidebar-resizing) .page-wrapper {
138 transition:
139 margin-left 0.3s ease,
140 transform 0.3s ease; /* Animation: slide away */
141}
142[dir="rtl"] .js:not(.sidebar-resizing) .page-wrapper {
143 transition:
144 margin-right 0.3s ease,
145 transform 0.3s ease; /* Animation: slide away */
146}
147
148.content {
149 overflow-y: auto;
150 padding: 48px 4px;
151}
152.content main {
153 margin-inline-start: auto;
154 margin-inline-end: auto;
155 max-width: var(--content-max-width);
156}
157.content p {
158 line-height: 1.625em;
159}
160.content div.video {
161 margin-top: 1rem;
162 border: 1px solid;
163 border-color: var(--border);
164 border-radius: 8px;
165 overflow: clip;
166}
167.content div.video iframe {
168 margin: 0;
169}
170.content ol {
171 marker: none;
172 line-height: 1.8;
173 padding-left: 2em;
174 ::marker {
175 font-size: 1.4rem;
176 }
177 li {
178 padding-left: 0;
179 }
180}
181.content ul {
182 line-height: 1.8;
183 padding-left: 1.8em;
184}
185.content a {
186 text-decoration: underline;
187 text-decoration-color: var(--link-line-decoration);
188}
189.content a:hover {
190 text-decoration-color: var(--link-line-decoration-hover);
191}
192.content img,
193.content video {
194 max-width: 100%;
195 background-color: var(--media-bg);
196 border: 1px solid;
197 border-color: var(--border);
198 border-radius: 8px;
199 overflow: clip;
200}
201.content .header:link,
202.content .header:visited {
203 color: var(--title-color);
204}
205.content .header:link,
206.content .header:visited:hover {
207 text-decoration: none;
208}
209
210iframe {
211 margin-top: 1rem;
212 margin-bottom: 10rem;
213}
214
215table {
216 width: 100%;
217 border-collapse: collapse;
218 font-size: 1.4rem;
219}
220table td {
221 padding: 4px 12px;
222 border: 1px var(--table-border-color) solid;
223}
224table thead {
225 background: var(--table-header-bg);
226}
227table thead td {
228 font-weight: 700;
229 border: none;
230}
231table thead th {
232 padding: 6px 12px;
233 color: var(--full-contrast);
234 text-align: left;
235 border: 1px var(--table-border-color) solid;
236}
237table thead tr {
238 border: 1px var(--table-border-color) solid;
239}
240/* Alternate background colors for rows */
241table tbody tr:nth-child(2n) {
242 background: var(--table-alternate-bg);
243}
244
245blockquote {
246 margin: auto;
247 margin-top: 1rem;
248 padding: 1rem 1.25rem;
249 color: var(--full-contrast);
250 background-color: var(--quote-bg);
251 border: 1px solid var(--quote-border);
252}
253
254blockquote > p {
255 margin: 0;
256 padding-left: 2.6rem;
257 font-size: 1.4rem;
258}
259
260blockquote:before {
261 --size: 1.4rem;
262 position: absolute;
263 content: "โ";
264 margin: 0.3rem 0;
265 width: var(--size);
266 height: var(--size);
267 font-size: var(--size);
268 font-weight: bold;
269 color: var(--icons);
270 display: flex;
271 align-items: center;
272 justify-content: center;
273 line-height: 1.625em;
274}
275
276blockquote .warning:before {
277 background-color: var(--quote-bg);
278}
279
280.warning {
281 margin: auto;
282 padding: 1rem 1.25rem;
283 color: var(--full-contrast);
284 background-color: var(--warning-bg);
285 border: 1px solid var(--warning-border);
286}
287
288.warning > p {
289 margin: 0;
290 padding-left: 2.6rem;
291 font-size: 1.4rem;
292}
293
294.warning:before {
295 --size: 1.4rem;
296 position: absolute;
297 content: "โ";
298 margin: 0.3rem 0;
299 width: var(--size);
300 height: var(--size);
301 font-size: var(--size);
302 font-weight: bold;
303 color: var(--warning-icon);
304 display: flex;
305 align-items: center;
306 justify-content: center;
307 line-height: 1.625em;
308}
309
310kbd {
311 background-color: rgba(8, 76, 207, 0.1);
312 border-radius: 4px;
313 border: solid 1px var(--theme-popup-border);
314 box-shadow: inset 0 -1px 0 var(--theme-hover);
315 display: inline-block;
316 font-size: var(--code-font-size);
317 font-family: var(--mono-font);
318 line-height: 10px;
319 padding: 4px 5px;
320 vertical-align: middle;
321}
322
323:not(.footnote-definition) + .footnote-definition,
324.footnote-definition + :not(.footnote-definition) {
325 margin-block-start: 2em;
326}
327.footnote-definition {
328 font-size: 1.4rem;
329 margin: 0.5em 0;
330 border-bottom: 1px solid;
331 border-color: var(--divider);
332}
333.footnote-definition p {
334 display: inline;
335}
336
337.tooltiptext {
338 position: absolute;
339 visibility: hidden;
340 color: #fff;
341 background-color: #333;
342 transform: translateX(
343 -50%
344 ); /* Center by moving tooltip 50% of its width left */
345 left: -8px; /* Half of the width of the icon */
346 top: -35px;
347 font-size: 0.8em;
348 text-align: center;
349 border-radius: 6px;
350 padding: 5px 8px;
351 margin: 5px;
352 z-index: 1000;
353}
354.tooltipped .tooltiptext {
355 visibility: visible;
356}
357
358.chapter li.part-title {
359 font-size: 18px;
360 font-family: var(--title-font);
361 font-weight: 520;
362 color: var(--title-color);
363 margin: 5px 0;
364 margin-top: 2rem;
365}
366
367.result-no-output {
368 font-style: italic;
369}
370
371code:not(pre code).hljs {
372 color: var(--code-text) !important;
373 background-color: var(--code-bg) !important;
374}