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,
83h3 {
84 margin-block-start: 1.5em;
85 margin-block-end: 0;
86}
87h4,
88h5 {
89 margin-block-start: 2em;
90}
91
92.header + .header h3,
93.header + .header h4,
94.header + .header h5 {
95 margin-block-start: 1em;
96}
97
98h1:target::before,
99h2:target::before,
100h3:target::before,
101h4:target::before,
102h5:target::before,
103h6:target::before {
104 display: inline-block;
105 content: "ยป";
106 margin-inline-start: -30px;
107 width: 30px;
108}
109
110/* This is broken on Safari as of version 14, but is fixed
111 in Safari Technology Preview 117 which I think will be Safari 14.2.
112 https://bugs.webkit.org/show_bug.cgi?id=218076
113*/
114:target {
115 /* Safari does not support logical properties */
116 scroll-margin-top: calc(var(--menu-bar-height) + 2rem);
117}
118
119.page {
120 outline: 0;
121 padding: 0 var(--page-padding);
122 margin-block-start: calc(
123 0px - var(--menu-bar-height)
124 ); /* Compensate for the #menu-bar-hover-placeholder */
125}
126.page-wrapper {
127 box-sizing: border-box;
128 background-color: var(--bg);
129}
130.no-js .page-wrapper,
131.js:not(.sidebar-resizing) .page-wrapper {
132 transition:
133 margin-left 0.3s ease,
134 transform 0.3s ease; /* Animation: slide away */
135}
136[dir="rtl"] .js:not(.sidebar-resizing) .page-wrapper {
137 transition:
138 margin-right 0.3s ease,
139 transform 0.3s ease; /* Animation: slide away */
140}
141
142.content {
143 overflow-y: auto;
144 padding: 48px 4px;
145}
146.content main {
147 margin-inline-start: auto;
148 margin-inline-end: auto;
149 max-width: var(--content-max-width);
150}
151.content p {
152 line-height: 1.625em;
153}
154.content div.video {
155 margin-top: 1rem;
156 border: 1px solid;
157 border-color: var(--border);
158 border-radius: 8px;
159 overflow: clip;
160}
161.content div.video iframe {
162 margin: 0;
163}
164.content ol {
165 line-height: 1.8;
166 padding-left: 1.8em;
167}
168.content ul {
169 line-height: 1.8;
170 padding-left: 1.8em;
171}
172.content li {
173 padding-left: 0.5em;
174}
175.content a {
176 text-decoration: underline;
177 text-decoration-color: var(--link-line-decoration);
178}
179.content a:hover {
180 text-decoration-color: var(--link-line-decoration-hover);
181}
182.content img,
183.content video {
184 max-width: 100%;
185 border: 1px solid;
186 border-color: var(--border);
187 border-radius: 8px;
188 overflow: clip;
189}
190.content .header:link,
191.content .header:visited {
192 color: var(--title-color);
193}
194.content .header:link,
195.content .header:visited:hover {
196 text-decoration: none;
197}
198
199iframe {
200 margin-top: 1rem;
201 margin-bottom: 10rem;
202}
203
204table {
205 width: 100%;
206 border-collapse: collapse;
207 font-size: 1.4rem;
208}
209table td {
210 padding: 4px 12px;
211 border: 1px var(--table-border-color) solid;
212}
213table thead {
214 background: var(--table-header-bg);
215}
216table thead td {
217 font-weight: 700;
218 border: none;
219}
220table thead th {
221 padding: 6px 12px;
222 color: var(--full-contrast);
223 text-align: left;
224 border: 1px var(--table-border-color) solid;
225}
226table thead tr {
227 border: 1px var(--table-border-color) solid;
228}
229/* Alternate background colors for rows */
230table tbody tr:nth-child(2n) {
231 background: var(--table-alternate-bg);
232}
233
234blockquote {
235 margin: auto;
236 margin-top: 1rem;
237 padding: 1rem 1.25rem;
238 color: var(--full-contrast);
239 background-color: var(--quote-bg);
240 border: 1px solid var(--quote-border);
241}
242
243blockquote > p {
244 margin: 0;
245 padding-left: 2.6rem;
246 font-size: 1.4rem;
247}
248
249blockquote:before {
250 position: absolute;
251 content: "โ";
252 margin: 0.3rem 0;
253 width: 1.6rem;
254 height: 1.6rem;
255 font-size: 1.6rem;
256 font-weight: bold;
257 color: var(--icons);
258 display: flex;
259 align-items: center;
260 justify-content: center;
261 line-height: 1.625em;
262}
263
264blockquote .warning:before {
265 background-color: var(--quote-bg);
266}
267
268.warning {
269 margin: auto;
270 padding: 1rem 1.25rem;
271 color: var(--full-contrast);
272 background-color: var(--warning-bg);
273 border: 1px solid var(--warning-border);
274}
275
276.warning > p {
277 margin: 0;
278 padding-left: 2.6rem;
279 font-size: 1.4rem;
280}
281
282.warning:before {
283 position: absolute;
284 content: "โ";
285 margin: 0.3rem 0;
286 width: 1.6rem;
287 height: 1.6rem;
288 font-size: 1.6rem;
289 font-weight: bold;
290 color: var(--warning-icon);
291 display: flex;
292 align-items: center;
293 justify-content: center;
294 line-height: 1.625em;
295}
296
297kbd {
298 background-color: rgba(8, 76, 207, 0.1);
299 border-radius: 4px;
300 border: solid 1px var(--theme-popup-border);
301 box-shadow: inset 0 -1px 0 var(--theme-hover);
302 display: inline-block;
303 font-size: var(--code-font-size);
304 font-family: var(--mono-font);
305 line-height: 10px;
306 padding: 4px 5px;
307 vertical-align: middle;
308}
309
310:not(.footnote-definition) + .footnote-definition,
311.footnote-definition + :not(.footnote-definition) {
312 margin-block-start: 2em;
313}
314.footnote-definition {
315 font-size: 1.4rem;
316 margin: 0.5em 0;
317 border-bottom: 1px solid;
318 border-color: var(--divider);
319}
320.footnote-definition p {
321 display: inline;
322}
323
324.tooltiptext {
325 position: absolute;
326 visibility: hidden;
327 color: #fff;
328 background-color: #333;
329 transform: translateX(
330 -50%
331 ); /* Center by moving tooltip 50% of its width left */
332 left: -8px; /* Half of the width of the icon */
333 top: -35px;
334 font-size: 0.8em;
335 text-align: center;
336 border-radius: 6px;
337 padding: 5px 8px;
338 margin: 5px;
339 z-index: 1000;
340}
341.tooltipped .tooltiptext {
342 visibility: visible;
343}
344
345.chapter li.part-title {
346 font-size: 18px;
347 font-family: var(--title-font);
348 font-weight: 520;
349 color: var(--title-color);
350 margin: 5px 0;
351 margin-top: 2rem;
352}
353
354.result-no-output {
355 font-style: italic;
356}
357
358code:not(pre code).hljs {
359 color: var(--code-text) !important;
360 background-color: var(--code-bg) !important;
361}