authorgravatar for 35231115+Rocknest@users.noreply.github.comRocknest <35231115+Rocknest@users.noreply.github.com> 2019-10-11 00:39:08+03:00
committergravatar for 35231115+Rocknest@users.noreply.github.comRocknest <35231115+Rocknest@users.noreply.github.com> 2019-10-11 00:39:08+03:00
log238ea85b7efcef797d7cb88c97dc677ecacd4938
tree6bb26c36a8cff0ab29c257fdb8cb19816a4367ad
parenta34b697c0c6655407d08aee1b7f56ce5ca5205a2

Fix dark mode

Additionally introduces css variables

1 files changed, 308 insertions(+), 355 deletions(-)

lib/std/special/docs/index.html+308-355
......@@ -5,490 +5,443 @@
55 <title>Documentation - Zig</title>
66 <link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAgklEQVR4AWMYWuD7EllJIM4G4g4g5oIJ/odhOJ8wToOxSTXgNxDHoeiBMfA4+wGShjyYOCkG/IGqWQziEzYAoUAeiF9D5U+DxEg14DRU7jWIT5IBIOdCxf+A+CQZAAoopEB7QJwBCBwHiip8UYmRdrAlDpIMgApwQZNnNii5Dq0MBgCxxycBnwEd+wAAAABJRU5ErkJggg==">
77 <style type="text/css">
8 .old body {
9 font-family: system-ui, -apple-system, Roboto, "Segoe UI", sans-serif;
10 max-width: 60em;
8 :root {
9 font-size: 1em;
10 --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
11 --mono: "Source Code Pro", monospace;
12 --tx-color: #141414;
13 --bg-color: #ffffff;
14 --link-color: #2A6286;
15 --sidebar-sh-color: rgba(0, 0, 0, 0.09);
16 --search-bg-color: #f3f3f3;
17 --search-bg-color-focus: #ffffff;
18 --search-sh-color: rgba(0, 0, 0, 0.18);
19 --help-sh-color: rgba(0, 0, 0, 0.75);
20 }
21
22 a {
23 text-decoration: none;
1124 }
12 .old .hidden {
25
26 a:hover {
27 text-decoration: underline;
28 }
29
30 .hidden {
1331 display: none;
1432 }
15 .old a {
16 color: #2A6286;
33
34 /* layout */
35 .canvas {
36 width: 100vw;
37 height: 100vh;
38 overflow: hidden;
39 margin: 0;
40 padding: 0;
41 font-family: var(--ui);
42 color: var(--tx-color);
43 background-color: var(--bg-color);
1744 }
18 .old pre{
19 font-family:"Source Code Pro",monospace;
20 font-size:1em;
21 background-color:#F5F5F5;
22 padding:1em;
23 overflow-x: auto;
45
46 .flex-main {
47 display: flex;
48 width: 100%;
49 height: 100%;
50 justify-content: center;
51
52 z-index: 100;
2453 }
25 .old code {
26 font-family:"Source Code Pro",monospace;
27 font-size:1em;
54
55 .flex-filler {
56 flex-grow: 1;
57 flex-shrink: 1;
2858 }
29 .old nav {
30 width: 10em;
31 position: fixed;
32 left: 0;
33 top: 0;
34 height: 100vh;
59
60 .flex-left {
61 width: 12rem;
62 max-width: 15vw;
63 min-width: 9.5rem;
3564 overflow: auto;
65 overflow-wrap: break-word;
66 flex-shrink: 0;
67 flex-grow: 0;
68
69 z-index: 300;
3670 }
37 .old nav h2 {
38 font-size: 1.2em;
39 text-decoration: underline;
40 margin: 0;
41 padding: 0.5em 0;
42 text-align: center;
71
72 .flex-right {
73 display: flex;
74 overflow: auto;
75 flex-grow: 1;
76 flex-shrink: 1;
77
78 z-index: 200;
79 }
80
81 .flex-right > .wrap {
82 width: 60rem;
83 max-width: 85vw;
84 flex-shrink: 1;
85 }
86
87 .help-modal {
88 z-index: 400;
89 }
90
91 /* sidebar */
92 .sidebar {
93 font-size: 1rem;
94 background-color: var(--bg-color);
95 box-shadow: 0 0 1rem var(--sidebar-sh-color);
96 }
97
98 .sidebar .logo {
99 padding: 0.35rem 0.35rem;
43100 }
44 .old nav p {
101
102 .sidebar .logo > img {
103 width: 100%;
104 }
105
106 .sidebar h2 {
107 margin: 0.5rem;
108 padding: 0;
109 font-size: 1.2rem;
110 }
111
112 .sidebar h2 > span {
113 border-bottom: 0.125rem dotted var(--tx-color);
114 }
115
116 .sidebar .packages {
117 list-style-type: none;
45118 margin: 0;
46119 padding: 0;
47 text-align: center;
120 background-color: #f1f1f1;
48121 }
49 .old section {
50 margin-left: 10em;
122
123 .sidebar .packages > li > a {
124 display: block;
125 padding: 0.5rem 1rem;
126 color: var(--tx-color);
127 text-decoration: none;
51128 }
52 .old section h1 {
129
130 .sidebar .packages > li > a:hover {
131 color: #fff;
132 background-color: #555;
133 }
134
135 .sidebar .packages > li > a.active {
136 color: #000;
137 background-color: #FFBB4D;
138 }
139
140 .sidebar p.str {
141 margin: 0.5rem;
142 font-family: var(--mono);
143 }
144
145 /* docs section */
146 .docs {
147 padding: 0.7rem 0.7rem 2.4rem 1.4rem;
148 font-size: 1rem;
149 background-color: var(--bg-color);
150 overflow-wrap: break-word;
151 }
152
153 .docs .search {
154 width: 100%;
155 padding: 0.5rem;
156 font-size: 1rem;
157 font-family: var(--ui);
158 color: var(--tx-color);
159 background-color: var(--search-bg-color);
160 border-top: 0;
161 border-left: 0;
162 border-right: 0;
163 border-bottom-width: 0.125rem;
164 border-bottom-style: solid;
165 border-bottom-color: var(--tx-color);
166 outline: none;
167 transition: border-bottom-color 0.35s, background 0.35s, box-shadow 0.35s;
168 }
169
170 .docs .search:focus {
171 background-color: var(--search-bg-color-focus);
172 border-bottom-color: #ffbb4d;
173 box-shadow: 0 0.3em 1em 0.125em var(--search-sh-color);
174 }
175
176 .docs .search::placeholder {
177 font-size: 1rem;
178 font-family: var(--ui);
179 color: var(--tx-color);
180 opacity: 0.5;
181 }
182
183 .docs a {
184 color: var(--link-color);
185 }
186
187 .docs pre {
188 font-family: var(--mono);
189 font-size:1em;
190 background-color:#F5F5F5;
191 padding:1em;
192 overflow-x: auto;
193 }
194
195 .docs code {
196 font-family: var(--mono);
197 font-size:1em;
198 }
199
200 .docs h1 {
53201 border-bottom: 1px dashed;
54202 }
55 .old section h2 {
203
204 .docs h2 {
56205 font-size: 1.3em;
57206 margin: 0.5em 0;
58207 padding: 0;
59208 border-bottom: 1px solid;
60209 }
61 .old #listNav {
210 #listNav {
62211 list-style-type: none;
63212 margin: 0.5em 0 0 0;
64213 padding: 0;
65214 overflow: hidden;
66215 background-color: #f1f1f1;
67216 }
68 .old #listNav li {
217 #listNav li {
69218 float:left;
70219 }
71 .old #listNav li a {
220 #listNav li a {
72221 display: block;
73222 color: #000;
74223 text-align: center;
75224 padding: .5em .8em;
76225 text-decoration: none;
77226 }
78 .old #listNav li a:hover {
227 #listNav li a:hover {
79228 background-color: #555;
80229 color: #fff;
81230 }
82 .old #listNav li a.active {
231 #listNav li a.active {
83232 background-color: #FFBB4D;
84233 color: #000;
85234 }
86235
87 .old #listPkgs {
88 list-style-type: none;
89 margin: 0;
90 padding: 0;
91 background-color: #f1f1f1;
92 }
93 .old #listPkgs li a {
94 display: block;
95 color: #000;
96 padding: 0.5em 1em;
97 text-decoration: none;
98 }
99 .old #listPkgs li a:hover {
100 background-color: #555;
101 color: #fff;
102 }
103 .old #listPkgs li a.active {
104 background-color: #FFBB4D;
105 color: #000;
106 }
107 .old #logo {
108 width: 8em;
109 padding: 0.5em 1em;
236 #listSearchResults li.selected {
237 background-color: #93e196;
110238 }
111239
112 .old #search {
113 width: 100%;
240 #tableFnErrors dt {
241 font-weight: bold;
114242 }
115243
116 .old #helpDialog {
117 width: 21em;
118 height: 19em;
244 .docs td {
245 vertical-align: top;
246 margin: 0;
247 padding: 0.5em;
248 max-width: 20em;
249 text-overflow: ellipsis;
250 overflow-x: hidden;
251 }
252
253 /* help dialog */
254 .help-modal {
255 display: flex;
256 width: 100%;
257 height: 100%;
119258 position: fixed;
120259 top: 0;
121260 left: 0;
122 background-color: #333;
261 justify-content: center;
262 align-items: center;
263 background-color: rgba(0, 0, 0, 0.15);
264 backdrop-filter: blur(0.3em);
265 }
266
267 .help-modal > .dialog {
268 max-width: 97vw;
269 max-height: 97vh;
270 overflow: auto;
271 font-size: 1rem;
123272 color: #fff;
124 border: 1px solid #fff;
273 background-color: #333;
274 border: 0.125rem solid #000;
275 box-shadow: 0 0.5rem 2.5rem 0.3rem var(--help-sh-color);
125276 }
126 .old #helpDialog h1 {
127 text-align: center;
277
278 .help-modal h1 {
279 margin: 0.75em 2.5em 1em 2.5em;
128280 font-size: 1.5em;
281 text-align: center;
129282 }
130 .old #helpDialog dt, #helpDialog dd {
283
284 .help-modal dt, .help-modal dd {
131285 display: inline;
132286 margin: 0 0.2em;
133287 }
134 .old kbd {
288
289 .help-modal dl {
290 margin-left: 0.5em;
291 margin-right: 0.5em;
292 }
293
294 .help-modal kbd {
295 display: inline-block;
296 padding: 0.3em 0.2em;
297 font-size: 1.2em;
298 font-size: var(--mono);
299 line-height: 0.8em;
300 vertical-align: middle;
135301 color: #000;
136302 background-color: #fafbfc;
137303 border-color: #d1d5da;
138304 border-bottom-color: #c6cbd1;
305 border: solid 0.0625em;
306 border-radius: 0.1875em;
139307 box-shadow-color: #c6cbd1;
140 display: inline-block;
141 padding: 0.3em 0.2em;
142 font: 1.2em monospace;
143 line-height: 0.8em;
144 vertical-align: middle;
145 border: solid 1px;
146 border-radius: 3px;
147 box-shadow: inset 0 -1px 0;
308 box-shadow: inset 0 -0.0625em 0;
148309 cursor: default;
149310 }
150
151 .old #listSearchResults li.selected {
152 background-color: #93e196;
153 }
154
155 .old #tableFnErrors dt {
156 font-weight: bold;
157 }
158
159 .old td {
160 vertical-align: top;
161 margin: 0;
162 padding: 0.5em;
163 max-width: 20em;
164 text-overflow: ellipsis;
165 overflow-x: hidden;
166 }
167
168 .old .tok-kw {
311
312 /* tokens */
313 .tok-kw {
169314 color: #333;
170315 font-weight: bold;
171316 }
172 .old .tok-str {
317 .tok-str {
173318 color: #d14;
174319 }
175 .old .tok-builtin {
320 .tok-builtin {
176321 color: #0086b3;
177322 }
178 .old .tok-comment {
323 .tok-comment {
179324 color: #777;
180325 font-style: italic;
181326 }
182 .old .tok-fn {
327 .tok-fn {
183328 color: #900;
184329 font-weight: bold;
185330 }
186 .old .tok-null {
331 .tok-null {
187332 color: #008080;
188333 }
189 .old .tok-number {
334 .tok-number {
190335 color: #008080;
191336 }
192 .old .tok-type {
337 .tok-type {
193338 color: #458;
194339 font-weight: bold;
195340 }
196
341
342 /* dark mode */
197343 @media (prefers-color-scheme: dark) {
198 .old body{
199 background-color: #111;
200 color: #bbb;
201 }
202 .old a {
203 color: #88f;
344
345 :root {
346 --tx-color: #bbb;
347 --bg-color: #111;
348 --link-color: #88f;
349 --sidebar-sh-color: rgba(128, 128, 128, 0.09);
350 --search-bg-color: #3c3c3c;
351 --search-bg-color-focus: #000;
352 --search-sh-color: rgba(255, 255, 255, 0.28);
353 --help-sh-color: rgba(142, 142, 142, 0.5);
204354 }
205 .old pre{
355
356 .docs pre {
206357 background-color:#2A2A2A;
207358 }
208 .old #listNav {
359 #listNav {
209360 background-color: #333;
210361 }
211 .old #listNav li a {
362 #listNav li a {
212363 color: #fff;
213364 }
214 .old #listNav li a:hover {
365 #listNav li a:hover {
215366 background-color: #555;
216367 color: #fff;
217368 }
218 .old #listNav li a.active {
369 #listNav li a.active {
219370 background-color: #FFBB4D;
220371 color: #000;
221372 }
222 .old #listPkgs {
373 #listPkgs {
223374 background-color: #333;
224375 }
225 .old #listPkgs li a {
376 #listPkgs li a {
226377 color: #fff;
227378 }
228 .old #listPkgs li a:hover {
379 #listPkgs li a:hover {
229380 background-color: #555;
230381 color: #fff;
231382 }
232 .old #listPkgs li a.active {
383 #listPkgs li a.active {
233384 background-color: #FFBB4D;
234385 color: #000;
235386 }
236 .old #listSearchResults li.selected {
387 #listSearchResults li.selected {
237388 background-color: #000;
238389 }
239 .old #listSearchResults li.selected a {
390 #listSearchResults li.selected a {
240391 color: #fff;
241392 }
242 .old .tok-kw {
393 .tok-kw {
243394 color: #eee;
244395 }
245 .old .tok-str {
396 .tok-str {
246397 color: #2e5;
247398 }
248 .old .tok-builtin {
399 .tok-builtin {
249400 color: #ff894c;
250401 }
251 .old .tok-comment {
402 .tok-comment {
252403 color: #aa7;
253404 }
254 .old .tok-fn {
405 .tok-fn {
255406 color: #e33;
256407 }
257 .old .tok-null {
408 .tok-null {
258409 color: #ff8080;
259410 }
260 .old .tok-number {
411 .tok-number {
261412 color: #ff8080;
262413 }
263 .old .tok-type {
414 .tok-type {
264415 color: #68f;
265416 }
266 }
267
268 /* ------- */
269 .hidden {
270 display: none;
271 }
272
273 .font-normal {
274 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
275 }
276
277 .font-mono {
278 font-family: "Source Code Pro", monospace;
279 }
280
281 .canvas {
282 margin: 0;
283 padding: 0;
284 width: 100vw;
285 height: 100vh;
286 overflow: hidden;
287 /*background-color: #fff4ef;*/
288 /*background-color: #f7f7f7;*/
289 }
290
291 .help-flex {
292 position: fixed;
293 top: 0;
294 left: 0;
295 width: 100%;
296 height: 100%;
297 display: flex;
298 justify-content: center;
299 align-items: center;
300 background-color: rgba(0, 0, 0, 0.15);
301
302 z-index: 400;
303 }
304
305 .help-modal {
306 max-width: 97vw;
307 max-height: 97vh;
308 background-color: #333;
309 color: #fff;
310 border: 0.125em solid #000;
311 box-shadow: 0 0.5em 2.5em 0.3em rgba(0, 0, 0, 0.75);
312 overflow: auto;
313 }
314
315 .help-modal h1 {
316 text-align: center;
317 font-size: 1.5em;
318 margin: 0.75em 2.5em 1em 2.5em;
319 }
320
321 dt, dd {
322 display: inline;
323 margin: 0 0.2em;
324 }
325
326 dl {
327 margin-left: 0.5em;
328 margin-right: 0.5em;
329 }
330
331 kbd {
332 color: #000;
333 background-color: #fafbfc;
334 border-color: #d1d5da;
335 border-bottom-color: #c6cbd1;
336 box-shadow-color: #c6cbd1;
337 display: inline-block;
338 padding: 0.3em 0.2em;
339 font: 1.2em monospace;
340 line-height: 0.8em;
341 vertical-align: middle;
342 border: solid 1px;
343 border-radius: 3px;
344 box-shadow: inset 0 -1px 0;
345 cursor: default;
346 }
347
348 .main-flex {
349 width: 100%;
350 height: 100%;
351 display: flex;
352 justify-content: center;
353
354 z-index: 100;
355 }
356
357 .flex-filler {
358 flex-grow: 1;
359 flex-shrink: 1;
360 }
361
362 .nav {
363 width: 12em;
364 overflow: auto;
365 max-width: 15vw;
366 min-width: 9.5em;
367 flex-shrink: 0;
368 flex-grow: 0;
369 background: #fff;
370 box-shadow: 0 0 1em rgba(0, 0, 0, 0.09);
371 overflow-wrap: break-word;
372417
373 z-index: 300;
374 }
375
376 nav h2 {
377 font-size: 1.2em;
378 margin: 0.5em;
379 padding: 0;
380 }
381
382 nav h2 > span {
383 border-bottom: 0.125em dotted #000;
384 }
385
386 nav p {
387 margin: 0.5em;
388418 }
389
390 .logo-wrap {
391 padding: 0.35em 0.35em;
392 }
393
394 .logo {
395 width: 100%;
396 }
397
398 .right-flex {
399 display: flex;
400 overflow: auto;
401 flex-grow: 1;
402 flex-shrink: 1;
403
404 z-index: 200;
405 }
406
407 .right-wrap {
408 width: 60em;
409 max-width: 85vw;
410 flex-shrink: 1;
411 }
412
413 .section-docs {
414 padding: 0.7em 0.7em 2.4em 1.4em;
415 background: #fff;
416 overflow-wrap: break-word;
417 }
418
419 .search {
420 width: 100%;
421 padding: 0.5em;
422 font-size: 1em;
423 background: #f3f3f3;
424 border-top: 0;
425 border-left: 0;
426 border-right: 0;
427 border-bottom-width: 0.125em;
428 border-bottom-style: solid;
429 border-bottom-color: #000;
430 outline: none;
431 transition: border-bottom-color 0.35s, background 0.35s, box-shadow 0.35s;
432 }
433
434 .search:focus {
435 border-bottom-color: #ffbb4d;
436 background: white;
437 box-shadow: 0 0.3em 1em 0.125em rgba(0, 0, 0, 0.18);
438 }
439
440 .search::placeholder {
441 color: #000;
442 opacity: 0.5;
443 }
444
445 /*section.section-docs h1 {
446 text-decoration: none;
447 border-bottom: 0.125em dashed #717171;
448 display: inline-block;
449 font-size: 1.35em;
450 max-width: 100%;
451 margin: 0.8em 0;
452 }
453
454 section.section-docs h2 {
455 font-size: 1.2em;
456 margin: 0.5em 0;
457 padding: 0;
458 text-decoration: none;
459 border-bottom: 0.125em solid #717171;
460 display: inline-block;
461 max-width: 100%;
462 }
463
464 table {
465 border: 1px solid red;
466 }*/
467419 </style>
468420 </head>
469 <body class="canvas font-normal">
470 <div class="main-flex">
421 <body class="canvas">
422 <div class="flex-main">
471423 <div class="flex-filler"></div>
472 <nav class="nav">
473 <div class="logo-wrap">
474 <img alt="ZIG" class="logo" id="logo" src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxNTAgMTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnIGZpbGw9IiNmN2E0MWQiPjxwYXRoIGQ9Im0wIDEwdjgwaDE5bDYtMTAgMTItMTBoLTE3di00MGgxNXYtMjB6bTQwIDB2MjBoNjJ2LTIwem05MSAwLTYgMTAtMTIgMTBoMTd2NDBoLTE1djIwaDM1di04MHptLTgzIDYwdjIwaDYydi0yMHoiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwYXRoIGQ9Im0zNyA3MC0xOCAyMHYtMTV6Ii8+PHBhdGggZD0ibTExMyAzMCAxOC0yMHYxNXoiLz48cGF0aCBkPSJtOTYuOTggMTAuNjMgMzYuMjgtMTAuNC04MC4yOSA4OS4xNy0zNi4yOCAxMC40eiIvPjwvZz48L3N2Zz4K"></img>
475 </div>
476 <div id="sectPkgs" class="old hidden">
477 <h2><span>Packages</span></h2>
478 <ul id="listPkgs">
479 </ul>
480 </div>
481 <div id="sectInfo" class="hidden">
482 <h2><span>Zig Version</span></h2>
483 <p class="font-mono" id="tdZigVer"></p>
484 <h2><span>Target</span></h2>
485 <p class="font-mono" id="tdTarget"></p>
486 </div>
487 </nav>
488 <div class="right-flex">
489 <div class="right-wrap">
490 <section class="old section-docs">
491 <input type="search" class="search font-normal" id="search" autocomplete="off" spellcheck="false" placeholder="`s` to search, `?` to see more options">
424 <div class="flex-left sidebar">
425 <nav>
426 <div class="logo">
427 <img alt="ZIG" id="logo" src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxNTAgMTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnIGZpbGw9IiNmN2E0MWQiPjxwYXRoIGQ9Im0wIDEwdjgwaDE5bDYtMTAgMTItMTBoLTE3di00MGgxNXYtMjB6bTQwIDB2MjBoNjJ2LTIwem05MSAwLTYgMTAtMTIgMTBoMTd2NDBoLTE1djIwaDM1di04MHptLTgzIDYwdjIwaDYydi0yMHoiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwYXRoIGQ9Im0zNyA3MC0xOCAyMHYtMTV6Ii8+PHBhdGggZD0ibTExMyAzMCAxOC0yMHYxNXoiLz48cGF0aCBkPSJtOTYuOTggMTAuNjMgMzYuMjgtMTAuNC04MC4yOSA4OS4xNy0zNi4yOCAxMC40eiIvPjwvZz48L3N2Zz4K"></img>
428 </div>
429 <div id="sectPkgs" class="hidden">
430 <h2><span>Packages</span></h2>
431 <ul id="listPkgs" class="packages"></ul>
432 </div>
433 <div id="sectInfo" class="hidden">
434 <h2><span>Zig Version</span></h2>
435 <p class="str" id="tdZigVer"></p>
436 <h2><span>Target</span></h2>
437 <p class="str" id="tdTarget"></p>
438 </div>
439 </nav>
440 </div>
441 <div class="flex-right">
442 <div class="wrap">
443 <section class="docs">
444 <input type="search" class="search" id="search" autocomplete="off" spellcheck="false" placeholder="`s` to search, `?` to see more options">
492445 <p id="status">Loading...</p>
493446 <div id="sectNav" class="hidden"><ul id="listNav"></ul></div>
494447 <div id="fnProto" class="hidden">
......@@ -562,8 +515,8 @@
562515 </div>
563516 </div>
564517 <div id="helpDialog" class="hidden">
565 <div class="help-flex">
566 <div class="help-modal">
518 <div class="help-modal">
519 <div class="dialog">
567520 <h1>Keyboard Shortcuts</h1>
568521 <dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd></dl>
569522 <dl><dt><kbd>Esc</kbd></dt><dd>Clear focus; close this dialog</dd></dl>