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