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