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