]> git.proxmox.com Git - rustc.git/blame - src/librustdoc/html/static/rustdoc.css
New upstream version 1.44.1+dfsg1
[rustc.git] / src / librustdoc / html / static / rustdoc.css
CommitLineData
b039eaaf 1/* See FiraSans-LICENSE.txt for the Fira Sans license. */
1a4d82fc 2@font-face {
476ff2be
SL
3 font-family: 'Fira Sans';
4 font-style: normal;
5 font-weight: 400;
6 src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
1a4d82fc
JJ
7}
8@font-face {
476ff2be
SL
9 font-family: 'Fira Sans';
10 font-style: normal;
11 font-weight: 500;
12 src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
1a4d82fc 13}
b039eaaf 14
0731742a 15/* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license. */
1a4d82fc 16@font-face {
476ff2be
SL
17 font-family: 'Source Serif Pro';
18 font-style: normal;
19 font-weight: 400;
0731742a 20 src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff');
1a4d82fc
JJ
21}
22@font-face {
476ff2be
SL
23 font-family: 'Source Serif Pro';
24 font-style: italic;
25 font-weight: 400;
0731742a 26 src: local('Source Serif Pro Italic'), url("SourceSerifPro-It.ttf.woff") format('woff');
1a4d82fc
JJ
27}
28@font-face {
476ff2be
SL
29 font-family: 'Source Serif Pro';
30 font-style: normal;
31 font-weight: 700;
0731742a 32 src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff');
1a4d82fc 33}
b039eaaf
SL
34
35/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
1a4d82fc 36@font-face {
476ff2be
SL
37 font-family: 'Source Code Pro';
38 font-style: normal;
39 font-weight: 400;
40 /* Avoid using locally installed font because bad versions are in circulation:
41 * see https://github.com/rust-lang/rust/issues/24355 */
42 src: url("SourceCodePro-Regular.woff") format('woff');
1a4d82fc
JJ
43}
44@font-face {
476ff2be
SL
45 font-family: 'Source Code Pro';
46 font-style: normal;
47 font-weight: 600;
48 src: url("SourceCodePro-Semibold.woff") format('woff');
1a4d82fc
JJ
49}
50
1a4d82fc
JJ
51* {
52 -webkit-box-sizing: border-box;
476ff2be
SL
53 -moz-box-sizing: border-box;
54 box-sizing: border-box;
1a4d82fc
JJ
55}
56
e1599b0c
XL
57/* This part handles the "default" theme being used depending on the system one. */
58html {
59 content: "";
60}
61@media (prefers-color-scheme: light) {
62 html {
63 content: "light";
64 }
65}
66@media (prefers-color-scheme: dark) {
67 html {
68 content: "dark";
69 }
70}
71
1a4d82fc
JJ
72/* General structure and fonts */
73
74body {
a1dfa0c6 75 font: 16px/1.4 "Source Serif Pro", serif;
476ff2be
SL
76 margin: 0;
77 position: relative;
78 padding: 10px 15px 20px 15px;
1a4d82fc 79
476ff2be
SL
80 -webkit-font-feature-settings: "kern", "liga";
81 -moz-font-feature-settings: "kern", "liga";
82 font-feature-settings: "kern", "liga";
1a4d82fc
JJ
83}
84
85h1 {
476ff2be 86 font-size: 1.5em;
1a4d82fc
JJ
87}
88h2 {
476ff2be 89 font-size: 1.4em;
1a4d82fc
JJ
90}
91h3 {
476ff2be 92 font-size: 1.3em;
1a4d82fc 93}
ff7c6d11 94h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
476ff2be
SL
95 font-weight: 500;
96 margin: 20px 0 15px 0;
97 padding-bottom: 6px;
1a4d82fc
JJ
98}
99h1.fqn {
476ff2be
SL
100 border-bottom: 1px dashed;
101 margin-top: 0;
1a4d82fc 102}
8bb4bdeb 103h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
476ff2be 104 border-bottom: 1px solid;
1a4d82fc 105}
8bb4bdeb 106h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
0731742a 107 flex-basis: 100%;
476ff2be 108 font-weight: 600;
0731742a 109 margin-top: 16px;
476ff2be
SL
110 margin-bottom: 10px;
111 position: relative;
1a4d82fc
JJ
112}
113h3.impl, h3.method, h3.type {
0531ce1d 114 padding-left: 15px;
1a4d82fc 115}
ea8adc8c
XL
116
117h1, h2, h3, h4,
118.sidebar, a.source, .search-input, .content table :not(code)>a,
a1dfa0c6
XL
119.collapse-toggle, div.item-list .out-of-band,
120#source-sidebar, #sidebar-toggle {
121 font-family: "Fira Sans", sans-serif;
1a4d82fc
JJ
122}
123
124ol, ul {
476ff2be 125 padding-left: 25px;
1a4d82fc
JJ
126}
127ul ul, ol ul, ul ol, ol ol {
a1dfa0c6 128 margin-bottom: .6em;
1a4d82fc
JJ
129}
130
131p {
476ff2be 132 margin: 0 0 .6em 0;
1a4d82fc
JJ
133}
134
3b2f2976
XL
135summary {
136 outline: none;
137}
138
74b04a01 139code, pre, a.test-arrow {
a1dfa0c6 140 font-family: "Source Code Pro", monospace;
1a4d82fc 141}
9e0c209e 142.docblock code, .docblock-short code {
476ff2be 143 border-radius: 3px;
0bf4aa26 144 padding: 0 0.1em;
1a4d82fc 145}
74b04a01 146.docblock pre code, .docblock-short pre code {
476ff2be 147 padding: 0;
c1a9b12d 148}
1a4d82fc 149pre {
476ff2be 150 padding: 14px;
1a4d82fc
JJ
151}
152
8bb4bdeb 153.source .content pre {
476ff2be 154 padding: 20px;
1a4d82fc
JJ
155}
156
9cc50fc6 157img {
476ff2be 158 max-width: 100%;
9cc50fc6
SL
159}
160
416331ca
XL
161li {
162 position: relative;
163}
164
8bb4bdeb 165.source .content {
476ff2be
SL
166 margin-top: 50px;
167 max-width: none;
168 overflow: visible;
169 margin-left: 0px;
170 min-width: 70em;
1a4d82fc
JJ
171}
172
173nav.sub {
476ff2be
SL
174 font-size: 16px;
175 text-transform: uppercase;
1a4d82fc
JJ
176}
177
178.sidebar {
476ff2be 179 width: 200px;
abe05a73 180 position: fixed;
476ff2be
SL
181 left: 0;
182 top: 0;
e74abb32 183 bottom: 0;
abe05a73 184 overflow: auto;
8bb4bdeb
XL
185}
186
ba9703b0
XL
187/* Improve the scrollbar display on firefox */
188* {
189 scrollbar-width: initial;
190}
191.sidebar {
192 scrollbar-width: thin;
193}
194
195/* Improve the scrollbar display on webkit-based browsers */
196::-webkit-scrollbar {
197 width: 12px;
198}
199.sidebar::-webkit-scrollbar {
200 width: 8px;
201}
202::-webkit-scrollbar-track {
203 -webkit-box-shadow: inset 0;
204}
205
2c00a5a8 206.sidebar .block > ul > li {
0531ce1d 207 margin-right: -10px;
1a4d82fc
JJ
208}
209
2c00a5a8
XL
210.content, nav {
211 max-width: 960px;
212}
1a4d82fc
JJ
213
214/* Everything else */
215
60c5eb7d 216.hidden {
2c00a5a8
XL
217 display: none !important;
218}
1a4d82fc 219
48663c56
XL
220.logo-container {
221 height: 100px;
222 width: 100px;
223 position: relative;
476ff2be
SL
224 margin: 20px auto;
225 display: block;
abe05a73 226 margin-top: 10px;
1a4d82fc
JJ
227}
228
48663c56
XL
229.logo-container > img {
230 max-width: 100px;
231 max-height: 100px;
232 position: absolute;
233 left: 50%;
234 top: 50%;
235 transform: translate(-50%, -50%);
236 display: block;
237}
238
1a4d82fc 239.sidebar .location {
8bb4bdeb 240 border: 1px solid;
476ff2be 241 font-size: 17px;
abe05a73 242 margin: 30px 10px 20px 10px;
476ff2be 243 text-align: center;
7cac9316 244 word-wrap: break-word;
1a4d82fc
JJ
245}
246
abe05a73
XL
247.sidebar .version {
248 font-size: 15px;
249 text-align: center;
ff7c6d11 250 border-bottom: 1px solid;
abe05a73
XL
251 overflow-wrap: break-word;
252 word-wrap: break-word; /* deprecated */
253 word-break: break-word; /* Chrome, non-standard */
254}
255
8bb4bdeb
XL
256.location:empty {
257 border: none;
258}
259
2c00a5a8
XL
260.location a:first-child {
261 font-weight: 500;
262}
1a4d82fc
JJ
263
264.block {
abe05a73 265 padding: 0;
476ff2be 266 margin-bottom: 14px;
1a4d82fc 267}
e9174d1e 268.block h2, .block h3 {
476ff2be
SL
269 margin-top: 0;
270 margin-bottom: 8px;
271 text-align: center;
1a4d82fc 272}
e9174d1e 273.block ul, .block li {
abe05a73 274 margin: 0 10px;
476ff2be
SL
275 padding: 0;
276 list-style: none;
e9174d1e 277}
1a4d82fc
JJ
278
279.block a {
476ff2be
SL
280 display: block;
281 text-overflow: ellipsis;
282 overflow: hidden;
283 line-height: 15px;
284 padding: 7px 5px;
285 font-size: 14px;
286 font-weight: 300;
287 transition: border 500ms ease-out;
1a4d82fc
JJ
288}
289
abe05a73 290.sidebar-title {
ff7c6d11
XL
291 border-top: 1px solid;
292 border-bottom: 1px solid;
abe05a73
XL
293 text-align: center;
294 font-size: 17px;
295 margin-bottom: 5px;
296}
297
298.sidebar-links {
299 margin-bottom: 15px;
300}
301
302.sidebar-links > a {
303 padding-left: 10px;
304 width: 100%;
305}
306
ff7c6d11
XL
307.sidebar-menu {
308 display: none;
309}
310
1a4d82fc 311.content {
476ff2be 312 padding: 15px 0;
1a4d82fc
JJ
313}
314
8bb4bdeb 315.source .content pre.rust {
476ff2be
SL
316 white-space: pre;
317 overflow: auto;
318 padding-left: 0;
1a4d82fc 319}
ff7c6d11 320
69743fb6 321.rustdoc:not(.source) .example-wrap {
a1dfa0c6
XL
322 display: inline-flex;
323 margin-bottom: 10px;
74b04a01 324 position: relative;
a1dfa0c6
XL
325}
326
327.example-wrap {
328 width: 100%;
329}
330
331.example-wrap > pre.line-number {
332 overflow: initial;
333 border: 1px solid;
334 border-top-left-radius: 5px;
335 border-bottom-left-radius: 5px;
336 padding: 13px 8px;
337 text-align: right;
338}
339
69743fb6 340.rustdoc:not(.source) .example-wrap > pre.rust {
a1dfa0c6 341 width: 100%;
0731742a 342 overflow-x: auto;
a1dfa0c6
XL
343}
344
69743fb6 345.rustdoc:not(.source) .example-wrap > pre {
a1dfa0c6
XL
346 margin: 0;
347}
348
7cac9316
XL
349#search {
350 margin-left: 230px;
ff7c6d11
XL
351 position: relative;
352}
353
354#results {
355 position: absolute;
356 right: 0;
357 left: 0;
358 overflow: auto;
7cac9316 359}
ff7c6d11 360
0531ce1d
XL
361#results > table {
362 width: 100%;
363 table-layout: fixed;
364}
365
1a4d82fc 366.content pre.line-numbers {
476ff2be
SL
367 float: left;
368 border: none;
369 position: relative;
1a4d82fc 370
476ff2be
SL
371 -webkit-user-select: none;
372 -moz-user-select: none;
373 -ms-user-select: none;
374 user-select: none;
1a4d82fc 375}
2c00a5a8
XL
376.line-numbers span {
377 cursor: pointer;
378}
1a4d82fc 379
9e0c209e 380.docblock-short p {
476ff2be 381 display: inline;
d9579d0f
AL
382}
383
9e0c209e 384.docblock-short.nowrap {
476ff2be
SL
385 display: block;
386 overflow: hidden;
387 white-space: nowrap;
388 text-overflow: ellipsis;
1a4d82fc
JJ
389}
390
9e0c209e 391.docblock-short p {
476ff2be
SL
392 overflow: hidden;
393 text-overflow: ellipsis;
394 margin: 0;
1a4d82fc 395}
60c5eb7d 396.docblock code, .docblock-short code {
48663c56 397 white-space: pre-wrap;
2c00a5a8 398}
1a4d82fc
JJ
399
400.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
476ff2be 401 border-bottom: 1px solid;
1a4d82fc
JJ
402}
403
3b2f2976
XL
404#main > .docblock h1 { font-size: 1.3em; }
405#main > .docblock h2 { font-size: 1.15em; }
406#main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
407
0731742a
XL
408#main > h2 + div, #main > h2 + h3, #main > h3 + div {
409 display: none; /* Changed to flex or block via js once the page is loaded */
410 flex-wrap: wrap;
411}
412
3b2f2976
XL
413.docblock h1 { font-size: 1em; }
414.docblock h2 { font-size: 0.95em; }
415.docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
1a4d82fc 416
3157f602 417.docblock {
476ff2be 418 margin-left: 24px;
ea8adc8c 419 position: relative;
3157f602
XL
420}
421
1a4d82fc 422.content .out-of-band {
b7449926 423 float: right;
476ff2be
SL
424 font-size: 23px;
425 margin: 0px;
426 padding: 0px;
476ff2be 427 font-weight: normal;
a7813a04
XL
428}
429
430h3.impl > .out-of-band {
476ff2be 431 font-size: 21px;
a7813a04
XL
432}
433
3b2f2976
XL
434h4.method > .out-of-band {
435 font-size: 19px;
436}
437
9e0c209e 438h4 > code, h3 > code, .invisible > code {
2c00a5a8
XL
439 max-width: calc(100% - 41px);
440 display: block;
a7813a04
XL
441}
442
9e0c209e 443.invisible {
476ff2be
SL
444 width: 100%;
445 display: inline-block;
9e0c209e
SL
446}
447
1a4d82fc 448.content .in-band {
476ff2be
SL
449 margin: 0px;
450 padding: 0px;
1a4d82fc
JJ
451}
452
ea8adc8c
XL
453.in-band > code {
454 display: inline-block;
455}
456
2c00a5a8
XL
457#main {
458 position: relative;
459}
a7813a04 460#main > .since {
476ff2be 461 top: inherit;
a1dfa0c6 462 font-family: "Fira Sans", sans-serif;
a7813a04
XL
463}
464
0531ce1d 465.content table:not(.table-display) {
476ff2be 466 border-spacing: 0 5px;
1a4d82fc
JJ
467}
468.content td { vertical-align: top; }
469.content td:first-child { padding-right: 20px; }
470.content td p:first-child { margin-top: 0; }
471.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
8faf50e0 472.content tr:first-child td { border-top: 0; }
1a4d82fc 473
85aaf69f 474.docblock table {
476ff2be 475 margin: .5em 0;
9fa01778
XL
476 width: calc(100% - 2px);
477 border: 1px dashed;
85aaf69f
SL
478}
479
480.docblock table td {
476ff2be 481 padding: .5em;
8faf50e0 482 border: 1px dashed;
85aaf69f
SL
483}
484
485.docblock table th {
476ff2be
SL
486 padding: .5em;
487 text-align: left;
8faf50e0 488 border: 1px solid;
476ff2be
SL
489}
490
491.fields + table {
492 margin-bottom: 1em;
85aaf69f
SL
493}
494
1a4d82fc 495.content .item-list {
476ff2be
SL
496 list-style-type: none;
497 padding: 0;
1a4d82fc
JJ
498}
499
1a4d82fc 500.content .multi-column {
476ff2be
SL
501 -moz-column-count: 5;
502 -moz-column-gap: 2.5em;
503 -webkit-column-count: 5;
504 -webkit-column-gap: 2.5em;
505 column-count: 5;
506 column-gap: 2.5em;
1a4d82fc
JJ
507}
508.content .multi-column li { width: 100%; display: inline-block; }
509
510.content .method {
476ff2be
SL
511 font-size: 1em;
512 position: relative;
1a4d82fc 513}
62682a34 514/* Shift "where ..." part of method or fn definition down a line */
476ff2be
SL
515.content .method .where,
516.content .fn .where,
517.content .where.fmt-newline {
8bb4bdeb 518 display: block;
7cac9316 519 font-size: 0.8em;
476ff2be 520}
1a4d82fc 521
74b04a01 522.content .methods > div {
0531ce1d
XL
523 margin-left: 40px;
524 margin-bottom: 15px;
525}
1a4d82fc 526
94b46f34 527.content .docblock > .impl-items {
476ff2be 528 margin-left: 20px;
94b46f34
XL
529 margin-top: -34px;
530}
531.content .docblock > .impl-items > h4 {
532 border-bottom: 0;
533}
534.content .docblock >.impl-items .table-display {
535 margin: 0;
536}
537.content .docblock >.impl-items table td {
538 padding: 0;
539}
540.toggle-wrapper.marg-left > .collapse-toggle {
541 left: -24px;
542}
543.content .docblock > .impl-items .table-display, .impl-items table td {
544 border: none;
d9579d0f 545}
1a4d82fc 546
e9174d1e 547.content .stability code {
476ff2be 548 font-size: 90%;
e9174d1e
SL
549}
550
b7449926
XL
551.content .stability {
552 position: relative;
553 margin-left: 33px;
554 margin-top: -13px;
555}
556
a1dfa0c6
XL
557.sub-variant > div > .stability {
558 margin-top: initial;
559}
560
b7449926 561.content .stability::before {
dfeec247
XL
562 content: '⬑';
563 font-size: 25px;
b7449926 564 position: absolute;
dfeec247
XL
565 top: -6px;
566 left: -19px;
b7449926 567}
a1dfa0c6
XL
568
569.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
570 margin-left: 20px;
571}
572
573.content .impl-items .docblock, .content .impl-items .stability {
574 margin-bottom: .6em;
575}
576
577.content .impl-items > .stability {
578 margin-left: 40px;
579}
580
581.methods > .stability, .content .impl-items > .stability {
b7449926
XL
582 margin-top: -8px;
583}
584
0731742a
XL
585.impl-items {
586 flex-basis: 100%;
587}
588
b7449926
XL
589#main > .stability {
590 margin-top: 0;
591}
592
e74abb32 593nav:not(.sidebar) {
476ff2be
SL
594 border-bottom: 1px solid;
595 padding-bottom: 10px;
596 margin-bottom: 10px;
1a4d82fc
JJ
597}
598nav.main {
476ff2be
SL
599 padding: 20px 0;
600 text-align: center;
1a4d82fc
JJ
601}
602nav.main .current {
476ff2be
SL
603 border-top: 1px solid;
604 border-bottom: 1px solid;
1a4d82fc
JJ
605}
606nav.main .separator {
476ff2be
SL
607 border: 1px solid;
608 display: inline-block;
609 height: 23px;
610 margin: 0 20px;
1a4d82fc
JJ
611}
612nav.sum { text-align: right; }
613nav.sub form { display: inline; }
614
e9174d1e 615nav.sub, .content {
476ff2be 616 margin-left: 230px;
1a4d82fc
JJ
617}
618
619a {
476ff2be
SL
620 text-decoration: none;
621 background: transparent;
1a4d82fc 622}
c34b1796 623
3b2f2976
XL
624.small-section-header:hover > .anchor {
625 display: initial;
626}
627
628.in-band:hover > .anchor {
ea8adc8c
XL
629 display: inline-block;
630 position: absolute;
3b2f2976
XL
631}
632.anchor {
633 display: none;
ea8adc8c 634 position: absolute;
0531ce1d 635 left: -7px;
ea8adc8c
XL
636}
637.anchor.field {
0531ce1d
XL
638 left: -5px;
639}
640.small-section-header > .anchor {
641 left: -28px;
b7449926 642 padding-right: 10px; /* avoid gap that causes hover to disappear */
3b2f2976 643}
ea8adc8c 644.anchor:before {
3b2f2976
XL
645 content: '\2002\00a7\2002';
646}
647
94b46f34
XL
648.docblock a:not(.srclink):not(.test-arrow):hover,
649.docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
476ff2be 650 text-decoration: underline;
c34b1796 651}
1a4d82fc 652
0731742a 653.invisible > .srclink, h4 > code + .srclink {
b7449926
XL
654 position: absolute;
655 top: 0;
656 right: 0;
657 font-size: 17px;
658 font-weight: normal;
659}
660
e9174d1e 661.block a.current.crate { font-weight: 500; }
1a4d82fc 662
83c7162d
XL
663.search-container {
664 position: relative;
665}
0731742a
XL
666.search-container > div {
667 display: inline-flex;
668 width: calc(100% - 34px);
669}
670#crate-search {
671 margin-top: 5px;
672 padding: 6px;
673 padding-right: 19px;
416331ca 674 flex: none;
0731742a
XL
675 border: 0;
676 border-right: 0;
677 border-radius: 4px 0 0 4px;
678 outline: none;
679 cursor: pointer;
680 border-right: 1px solid;
681 -moz-appearance: none;
682 -webkit-appearance: none;
683 /* Removes default arrow from firefox */
684 text-indent: 0.01px;
685 text-overflow: "";
686 background-repeat: no-repeat;
687 background-color: transparent;
688 background-size: 20px;
689 background-position: calc(100% - 1px) 56%;
690}
83c7162d
XL
691.search-container > .top-button {
692 position: absolute;
693 right: 0;
694 top: 10px;
695}
1a4d82fc 696.search-input {
476ff2be
SL
697 /* Override Normalize.css: we have margins and do
698 not want to overflow - the `moz` attribute is necessary
699 until Firefox 29, too early to drop at this point */
700 -moz-box-sizing: border-box !important;
701 box-sizing: border-box !important;
702 outline: none;
703 border: none;
704 border-radius: 1px;
705 margin-top: 5px;
706 padding: 10px 16px;
707 font-size: 17px;
708 transition: border-color 300ms ease;
709 transition: border-radius 300ms ease-in-out;
710 transition: box-shadow 300ms ease-in-out;
48663c56 711 width: 100%;
0731742a
XL
712}
713
714#crate-search + .search-input {
715 border-radius: 0 1px 1px 0;
48663c56 716 width: calc(100% - 32px);
1a4d82fc
JJ
717}
718
719.search-input:focus {
476ff2be
SL
720 border-radius: 2px;
721 border: 0;
722 outline: 0;
1a4d82fc
JJ
723}
724
725.search-results .desc {
476ff2be
SL
726 white-space: nowrap;
727 text-overflow: ellipsis;
728 overflow: hidden;
729 display: block;
1a4d82fc
JJ
730}
731
732.search-results a {
476ff2be 733 display: block;
1a4d82fc
JJ
734}
735
0531ce1d
XL
736.content .search-results td:first-child {
737 padding-right: 0;
b7449926 738 width: 50%;
0531ce1d
XL
739}
740.content .search-results td:first-child a {
741 padding-right: 10px;
742}
b7449926 743.content .search-results td:first-child a:after {
a1dfa0c6
XL
744 clear: both;
745 content: "";
746 display: block;
b7449926 747}
0531ce1d
XL
748.content .search-results td:first-child a span {
749 float: left;
750}
1a4d82fc 751
abe05a73 752tr.result span.primitive::after {
ff7c6d11
XL
753 content: ' (primitive type)';
754 font-style: italic;
9e0c209e 755}
62682a34 756
94b46f34
XL
757tr.result span.keyword::after {
758 content: ' (keyword)';
759 font-style: italic;
760}
761
c1a9b12d 762body.blur > :not(#help) {
476ff2be
SL
763 filter: blur(8px);
764 -webkit-filter: blur(8px);
765 opacity: .7;
c1a9b12d
SL
766}
767
1a4d82fc 768#help {
476ff2be
SL
769 width: 100%;
770 height: 100vh;
771 position: fixed;
772 top: 0;
773 left: 0;
774 display: flex;
775 justify-content: center;
776 align-items: center;
c1a9b12d
SL
777}
778#help > div {
476ff2be 779 flex: 0 0 auto;
476ff2be
SL
780 box-shadow: 0 0 6px rgba(0,0,0,.2);
781 width: 550px;
2c00a5a8 782 height: auto;
8bb4bdeb 783 border: 1px solid;
1a4d82fc 784}
1a4d82fc 785#help dt {
476ff2be 786 float: left;
476ff2be
SL
787 clear: left;
788 display: block;
1a4d82fc 789}
abe05a73 790#help dd { margin: 5px 35px; }
1a4d82fc 791#help .infos { padding-left: 0; }
e9174d1e 792#help h1, #help h2 { margin-top: 0; }
c1a9b12d 793#help > div div {
476ff2be
SL
794 width: 50%;
795 float: left;
796 padding: 20px;
abe05a73 797 padding-left: 17px;
1a4d82fc
JJ
798}
799
32a655c1
SL
800.stab {
801 display: table;
476ff2be
SL
802 border-width: 1px;
803 border-style: solid;
804 padding: 3px;
805 margin-bottom: 5px;
806 font-size: 90%;
1a4d82fc 807}
32a655c1 808.stab p {
476ff2be 809 display: inline;
1a4d82fc
JJ
810}
811
32a655c1
SL
812.stab summary {
813 display: list-item;
814}
815
0731742a 816.stab .emoji {
32a655c1
SL
817 font-size: 1.5em;
818}
819
d9579d0f 820.module-item .stab {
9fa01778
XL
821 border-radius: 3px;
822 display: inline-block;
823 font-size: 80%;
824 line-height: 1.2;
825 margin-bottom: 0;
826 margin-right: .3em;
827 padding: 2px;
828 vertical-align: text-bottom;
1a4d82fc
JJ
829}
830
d9579d0f 831.module-item.unstable {
476ff2be 832 opacity: 0.65;
d9579d0f 833}
1a4d82fc 834
a7813a04 835.since {
476ff2be
SL
836 font-weight: normal;
837 font-size: initial;
476ff2be
SL
838 position: absolute;
839 right: 0;
840 top: 0;
7453a54e
SL
841}
842
0731742a
XL
843.impl-items .since, .impl .since {
844 flex-grow: 0;
845 padding-left: 12px;
846 padding-right: 2px;
847 position: initial;
848}
849
850.impl-items .srclink, .impl .srclink {
851 flex-grow: 0;
852 /* Override header settings otherwise it's too bold */
853 font-size: 17px;
854 font-weight: normal;
855}
856
857.impl-items code, .impl code {
858 flex-grow: 1;
859}
860
861.impl-items h4, h4.impl, h3.impl {
862 display: flex;
863 flex-basis: 100%;
864 font-size: 16px;
865 margin-bottom: 12px;
866 /* Push the src link out to the right edge consistently */
867 justify-content: space-between;
868}
869
7453a54e 870.variants_table {
476ff2be 871 width: 100%;
7453a54e
SL
872}
873
874.variants_table tbody tr td:first-child {
476ff2be 875 width: 1%; /* make the variant name as small as possible */
7453a54e
SL
876}
877
c34b1796 878td.summary-column {
476ff2be 879 width: 100%;
c34b1796
AL
880}
881
1a4d82fc 882.summary {
476ff2be 883 padding-right: 0px;
1a4d82fc 884}
1a4d82fc 885
c30ab7b3 886pre.rust .question-mark {
476ff2be 887 font-weight: bold;
c30ab7b3 888}
1a4d82fc 889
b039eaaf 890a.test-arrow {
476ff2be
SL
891 display: inline-block;
892 position: absolute;
893 padding: 5px 10px 5px 10px;
894 border-radius: 5px;
895 font-size: 130%;
896 top: 5px;
897 right: 5px;
74b04a01 898 z-index: 1;
1a4d82fc 899}
9e0c209e 900a.test-arrow:hover{
476ff2be 901 text-decoration: none;
9e0c209e 902}
1a4d82fc 903
ea8adc8c
XL
904.section-header:hover a:before {
905 position: absolute;
906 left: -25px;
b7449926 907 padding-right: 10px; /* avoid gap that causes hover to disappear */
476ff2be 908 content: '\2002\00a7\2002';
1a4d82fc
JJ
909}
910
c34b1796 911.section-header:hover a {
476ff2be 912 text-decoration: none;
c34b1796
AL
913}
914
915.section-header a {
476ff2be 916 color: inherit;
c34b1796
AL
917}
918
1a4d82fc 919.collapse-toggle {
476ff2be
SL
920 font-weight: 300;
921 position: absolute;
922 left: -23px;
476ff2be 923 top: 0;
1a4d82fc
JJ
924}
925
7cac9316
XL
926h3 > .collapse-toggle, h4 > .collapse-toggle {
927 font-size: 0.8em;
928 top: 5px;
929}
930
1a4d82fc 931.toggle-wrapper > .collapse-toggle {
476ff2be
SL
932 left: -24px;
933 margin-top: 0px;
1a4d82fc
JJ
934}
935
936.toggle-wrapper {
476ff2be 937 position: relative;
94b46f34 938 margin-top: 0;
1a4d82fc
JJ
939}
940
941.toggle-wrapper.collapsed {
ea8adc8c 942 height: 25px;
476ff2be 943 transition: height .2s;
ea8adc8c 944 margin-bottom: .6em;
1a4d82fc
JJ
945}
946
947.collapse-toggle > .inner {
476ff2be
SL
948 display: inline-block;
949 width: 1.2ch;
950 text-align: center;
1a4d82fc
JJ
951}
952
a1dfa0c6
XL
953.collapse-toggle.hidden-default {
954 position: relative;
955 margin-left: 20px;
956}
957
a7813a04 958.since + .srclink {
476ff2be
SL
959 display: table-cell;
960 padding-left: 10px;
a7813a04
XL
961}
962
041b39d2
XL
963.item-spacer {
964 width: 100%;
965 height: 12px;
966}
967
48663c56 968.out-of-band > span.since {
476ff2be
SL
969 position: initial;
970 font-size: 20px;
971 margin-right: 5px;
a7813a04 972}
1a4d82fc 973
5bcae85e 974.toggle-wrapper > .collapse-toggle {
476ff2be 975 left: 0;
5bcae85e
SL
976}
977
3b2f2976
XL
978.variant + .toggle-wrapper + .docblock > p {
979 margin-top: 5px;
980}
981
476ff2be 982.sub-variant, .sub-variant > h3 {
a1dfa0c6
XL
983 margin-top: 1px !important;
984}
985
986#main > .sub-variant > h3 {
987 font-size: 15px;
988 margin-left: 25px;
989 margin-bottom: 5px;
990}
991
992.sub-variant > div {
993 margin-left: 20px;
994 margin-bottom: 10px;
995}
996
997.sub-variant > div > span {
998 display: block;
999 position: relative;
3157f602
XL
1000}
1001
ea8adc8c
XL
1002.toggle-label {
1003 display: inline-block;
1004 margin-left: 4px;
1005 margin-top: 3px;
1006}
1007
3157f602 1008.enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
476ff2be
SL
1009 margin-left: 30px;
1010 margin-bottom: 20px;
1011 margin-top: 5px;
3157f602
XL
1012}
1013
abe05a73
XL
1014.docblock > .section-header:first-child {
1015 margin-left: 15px;
1016 margin-top: 0;
1017}
1018
1019.docblock > .section-header:first-child:hover > a:before {
1020 left: -10px;
1021}
1022
3157f602 1023.enum > .collapsed, .struct > .collapsed {
476ff2be 1024 margin-bottom: 25px;
3157f602
XL
1025}
1026
3b2f2976 1027#main > .variant, #main > .structfield {
476ff2be
SL
1028 display: block;
1029}
1030
1031.attributes {
1032 display: block;
94b46f34
XL
1033 margin-top: 0px !important;
1034 margin-right: 0px;
1035 margin-bottom: 0px !important;
1036 margin-left: 30px;
476ff2be
SL
1037}
1038.toggle-attributes.collapsed {
94b46f34
XL
1039 margin-bottom: 0;
1040}
1041.impl-items > .toggle-attributes {
1042 margin-left: 20px;
1043}
1044.impl-items .attributes {
1045 font-weight: 500;
3157f602
XL
1046}
1047
a7813a04 1048:target > code {
8bb4bdeb 1049 opacity: 1;
a7813a04 1050}
1a4d82fc 1051
48663c56
XL
1052.information {
1053 position: absolute;
ba9703b0 1054 left: -25px;
48663c56
XL
1055 margin-top: 7px;
1056 z-index: 1;
1057}
1058
1059.tooltip {
1060 position: relative;
1061 display: inline-block;
1062 cursor: pointer;
1063}
1064
1065.tooltip .tooltiptext {
1066 width: 120px;
1067 display: none;
1068 text-align: center;
ba9703b0 1069 padding: 5px 3px 3px 3px;
48663c56
XL
1070 border-radius: 6px;
1071 margin-left: 5px;
1072 top: -5px;
1073 left: 105%;
1074 z-index: 10;
ba9703b0 1075 font-size: 16px;
48663c56
XL
1076}
1077
1078.tooltip:hover .tooltiptext {
1079 display: inline;
1080}
1081
1082.tooltip .tooltiptext::after {
1083 content: " ";
1084 position: absolute;
1085 top: 50%;
ba9703b0 1086 left: 16px;
48663c56
XL
1087 margin-top: -5px;
1088 border-width: 5px;
1089 border-style: solid;
1090}
1091
ba9703b0
XL
1092.tooltip.compile_fail, .tooltip.ignore {
1093 font-weight: bold;
1094 font-size: 20px;
1095}
1096
74b04a01 1097.tooltip .tooltiptext {
48663c56 1098 border: 1px solid;
ba9703b0 1099 font-weight: normal;
48663c56
XL
1100}
1101
1102pre.rust {
1103 position: relative;
ba9703b0
XL
1104 tab-size: 4;
1105 -moz-tab-size: 4;
48663c56
XL
1106}
1107
1108.search-failed {
1109 text-align: center;
1110 margin-top: 20px;
1111}
1112
1113.search-failed > ul {
1114 text-align: left;
1115 max-width: 570px;
1116 margin-left: auto;
1117 margin-right: auto;
1118}
1119
1120#titles {
1121 height: 35px;
1122}
1123
1124#titles > div {
1125 float: left;
1126 width: 33.3%;
1127 text-align: center;
1128 font-size: 18px;
1129 cursor: pointer;
1130 border-top: 2px solid;
1131}
1132
1133#titles > div:not(:last-child) {
1134 margin-right: 1px;
1135 width: calc(33.3% - 1px);
1136}
1137
1138#titles > div > div.count {
1139 display: inline-block;
1140 font-size: 16px;
1141}
1142
48663c56
XL
1143#all-types {
1144 text-align: center;
1145 border: 1px solid;
1146 margin: 0 10px;
1147 margin-bottom: 10px;
1148 display: block;
1149 border-radius: 7px;
1150}
1151#all-types > p {
1152 margin: 5px 0;
1153}
1154
1155#sidebar-toggle {
1156 position: fixed;
1157 top: 30px;
1158 left: 300px;
1159 z-index: 10;
1160 padding: 3px;
1161 border-top-right-radius: 3px;
1162 border-bottom-right-radius: 3px;
1163 cursor: pointer;
1164 font-weight: bold;
1165 transition: left .5s;
1166 font-size: 1.2em;
1167 border: 1px solid;
1168 border-left: 0;
1169}
1170#source-sidebar {
1171 position: fixed;
1172 top: 0;
1173 bottom: 0;
1174 left: 0;
1175 width: 300px;
1176 z-index: 1;
1177 overflow: auto;
1178 transition: left .5s;
1179 border-right: 1px solid;
1180}
1181#source-sidebar > .title {
1182 font-size: 1.5em;
1183 text-align: center;
1184 border-bottom: 1px solid;
1185 margin-bottom: 6px;
1186}
1187
1188.theme-picker {
1189 position: absolute;
1190 left: 211px;
1191 top: 19px;
1192}
1193
1194.theme-picker button {
1195 outline: none;
1196}
1197
1198#settings-menu {
1199 position: absolute;
1200 right: 0;
1201 top: 10px;
1202 outline: none;
1203}
1204
1205#theme-picker, #settings-menu {
1206 padding: 4px;
1207 width: 27px;
1208 height: 29px;
1209 border: 1px solid;
1210 border-radius: 3px;
1211 cursor: pointer;
1212}
1213
1214#theme-choices {
1215 display: none;
1216 position: absolute;
1217 left: 0;
1218 top: 28px;
1219 border: 1px solid;
1220 border-radius: 3px;
1221 z-index: 1;
1222 cursor: pointer;
1223}
1224
1225#theme-choices > button {
1226 border: none;
1227 width: 100%;
1228 padding: 4px;
1229 text-align: center;
1230 background: rgba(0,0,0,0);
1231}
1232
1233#theme-choices > button:not(:first-child) {
1234 border-top: 1px solid;
1235}
1236
1a4d82fc
JJ
1237/* Media Queries */
1238
1239@media (max-width: 700px) {
476ff2be
SL
1240 body {
1241 padding-top: 0px;
1242 }
1243
a1dfa0c6 1244 .rustdoc > .sidebar {
abe05a73 1245 height: 45px;
476ff2be 1246 min-height: 40px;
abe05a73
XL
1247 margin: 0;
1248 margin-left: -15px;
1249 padding: 0 15px;
476ff2be 1250 position: static;
0731742a 1251 z-index: 11;
476ff2be
SL
1252 }
1253
ff7c6d11 1254 .sidebar > .location {
476ff2be
SL
1255 float: right;
1256 margin: 0px;
abe05a73 1257 margin-top: 2px;
476ff2be
SL
1258 padding: 3px 10px 1px 10px;
1259 min-height: 39px;
1260 background: inherit;
1261 text-align: left;
1262 font-size: 24px;
1263 }
1264
1265 .sidebar .location:empty {
1266 padding: 0;
1267 }
1268
48663c56 1269 .sidebar .logo-container {
476ff2be 1270 width: 35px;
48663c56 1271 height: 35px;
476ff2be 1272 margin-top: 5px;
abe05a73 1273 margin-bottom: 5px;
476ff2be 1274 float: left;
ff7c6d11 1275 margin-left: 50px;
476ff2be
SL
1276 }
1277
48663c56
XL
1278 .sidebar .logo-container > img {
1279 max-width: 35px;
1280 max-height: 35px;
1281 }
1282
ff7c6d11
XL
1283 .sidebar-menu {
1284 position: fixed;
1285 z-index: 10;
1286 font-size: 2rem;
1287 cursor: pointer;
1288 width: 45px;
1289 left: 0;
1290 text-align: center;
1291 display: block;
1292 border-bottom: 1px solid;
1293 border-right: 1px solid;
2c00a5a8 1294 height: 45px;
476ff2be
SL
1295 }
1296
48663c56
XL
1297 .rustdoc.source > .sidebar > .sidebar-menu {
1298 display: none;
1299 }
1300
ff7c6d11
XL
1301 .sidebar-elems {
1302 position: fixed;
1303 z-index: 1;
1304 left: 0;
1305 top: 45px;
1306 bottom: 0;
1307 overflow-y: auto;
1308 border-right: 1px solid;
476ff2be
SL
1309 display: none;
1310 }
1311
ff7c6d11
XL
1312 .sidebar > .block.version {
1313 border-bottom: none;
1314 margin-top: 12px;
1315 }
1316
1317 nav.sub {
2c00a5a8
XL
1318 width: calc(100% - 32px);
1319 float: right;
ff7c6d11
XL
1320 }
1321
476ff2be
SL
1322 .content {
1323 margin-left: 0px;
1324 }
1325
2c00a5a8
XL
1326 #main {
1327 margin-top: 45px;
1328 padding: 0;
1329 }
1330
476ff2be
SL
1331 .content .in-band {
1332 width: 100%;
1333 }
1334
abe05a73
XL
1335 .content h4 > .out-of-band {
1336 position: inherit;
476ff2be
SL
1337 }
1338
1339 .toggle-wrapper > .collapse-toggle {
1340 left: 0px;
1341 }
1342
1343 .toggle-wrapper {
1344 height: 1.5em;
1345 }
abe05a73
XL
1346
1347 #search {
1348 margin-left: 0;
1349 }
1350
1351 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1352 display: flex;
1353 }
0531ce1d
XL
1354
1355 .anchor {
1356 display: none !important;
1357 }
0bf4aa26
XL
1358
1359 h1.fqn {
1360 overflow: initial;
1361 }
1a4d82fc 1362
48663c56
XL
1363 .theme-picker {
1364 left: 10px;
1365 top: 54px;
1366 z-index: 1;
476ff2be 1367 }
ea8adc8c 1368
ff7c6d11
XL
1369 #titles > div > div.count {
1370 float: left;
1371 width: 100%;
1372 }
1373
1374 #titles {
1375 height: 50px;
1376 }
1377
1378 .sidebar.mobile {
1379 position: fixed;
1380 width: 100%;
1381 margin-left: 0;
1382 background-color: rgba(0,0,0,0);
1383 height: 100%;
1384 }
0bf4aa26
XL
1385 .sidebar {
1386 width: calc(100% + 30px);
1387 }
ff7c6d11
XL
1388
1389 .show-it {
1390 display: block;
2c00a5a8
XL
1391 width: 246px;
1392 }
1393
1394 .show-it > .block.items {
1395 margin: 8px 0;
1396 }
1397
1398 .show-it > .block.items > ul {
1399 margin: 0;
1400 }
1401
1402 .show-it > .block.items > ul > li {
1403 text-align: center;
1404 margin: 2px 0;
1405 }
1406
1407 .show-it > .block.items > ul > li > a {
1408 font-size: 21px;
ff7c6d11
XL
1409 }
1410
1411 /* Because of ios, we need to actually have a full height sidebar title so the
1412 * actual sidebar can show up. But then we need to make it transparent so we don't
1413 * hide content. The filler just allows to create the background for the sidebar
1414 * title. But because of the absolute position, I had to lower the z-index.
1415 */
1416 #sidebar-filler {
1417 position: fixed;
1418 left: 45px;
1419 width: calc(100% - 45px);
1420 top: 0;
1421 height: 45px;
1422 z-index: -1;
1423 border-bottom: 1px solid;
1424 }
0531ce1d
XL
1425
1426 .collapse-toggle {
1427 left: -20px;
1428 }
1429
1430 .impl > .collapse-toggle {
1431 left: -10px;
1432 }
0bf4aa26
XL
1433
1434 #all-types {
1435 margin: 10px;
1436 }
48663c56
XL
1437
1438 #sidebar-toggle {
1439 top: 100px;
1440 width: 30px;
1441 font-size: 1.5rem;
1442 text-align: center;
1443 padding: 0;
1444 }
1445
1446 #source-sidebar {
1447 z-index: 11;
1448 }
1449
1450 #main > .line-numbers {
1451 margin-top: 0;
1452 }
ff7c6d11
XL
1453}
1454
48663c56
XL
1455@media print {
1456 nav.sub, .content .out-of-band, .collapse-toggle {
1457 display: none;
1458 }
1459}
ff7c6d11
XL
1460
1461@media (max-width: 416px) {
1462 #titles {
1463 height: 73px;
1464 }
1465
1466 #titles > div {
1467 height: 73px;
1468 }
1469}
1470
ff7c6d11
XL
1471h3.important {
1472 margin: 0;
1473 margin-bottom: 13px;
1474 font-size: 19px;
1475}
1476
2c00a5a8
XL
1477kbd {
1478 display: inline-block;
1479 padding: 3px 5px;
a1dfa0c6 1480 font: 15px monospace;
2c00a5a8
XL
1481 line-height: 10px;
1482 vertical-align: middle;
1483 border: solid 1px;
1484 border-radius: 3px;
1485 box-shadow: inset 0 -1px 0;
1486 cursor: default;
1487}
1488
0531ce1d
XL
1489.hidden-by-impl-hider,
1490.hidden-by-usual-hider {
1491 /* important because of conflicting rule for small screens */
1492 display: none !important;
1493}
1494
1495#implementations-list > h3 > span.in-band {
1496 width: 100%;
1497}
1498
1499.table-display {
1500 width: 100%;
1501 border: 0;
1502 border-collapse: collapse;
1503 border-spacing: 0;
1504 font-size: 16px;
1505}
1506
1507.table-display tr td:first-child {
1508 padding-right: 0;
1509}
1510
1511.table-display tr td:last-child {
1512 float: right;
1513}
1514.table-display .out-of-band {
1515 position: relative;
1516 font-size: 19px;
1517 display: block;
1518}
b7449926
XL
1519#implementors-list > .impl-items .table-display .out-of-band {
1520 font-size: 17px;
1521}
1522
1523.table-display td:hover .anchor {
1524 display: block;
1525 top: 2px;
1526 left: -5px;
1527}
83c7162d
XL
1528
1529#main > ul {
1530 padding-left: 10px;
1531}
1532#main > ul > li {
1533 list-style: none;
1534}
8faf50e0
XL
1535
1536.non-exhaustive {
1537 margin-bottom: 1em;
1538}
a1dfa0c6 1539
a1dfa0c6
XL
1540div.children {
1541 padding-left: 27px;
1542 display: none;
1543}
1544div.name {
1545 cursor: pointer;
1546 position: relative;
1547 margin-left: 16px;
1548}
1549div.files > a {
1550 display: block;
1551 padding: 0 3px;
1552}
1553div.files > a:hover, div.name:hover {
1554 background-color: #a14b4b;
1555}
1556div.name.expand + .children {
1557 display: block;
1558}
1559div.name::before {
1560 content: "\25B6";
1561 padding-left: 4px;
1562 font-size: 0.7em;
1563 position: absolute;
1564 left: -16px;
1565 top: 4px;
1566}
1567div.name.expand::before {
1568 transform: rotate(90deg);
9fa01778
XL
1569 left: -15px;
1570 top: 2px;
a1dfa0c6 1571}
48663c56
XL
1572
1573/* This part is to fix the "Expand attributes" part in the type declaration. */
1574.type-decl > pre > .toggle-wrapper.toggle-attributes.top-attr {
1575 margin-left: 0 !important;
1576}
1577.type-decl > pre > .docblock.attributes.top-attr {
1578 margin-left: 1.8em !important;
1579}
1580.type-decl > pre > .toggle-attributes {
1581 margin-left: 2.2em;
1582}
1583.type-decl > pre > .docblock.attributes {
1584 margin-left: 4em;
1585}