]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/rustdoc.css
Rollup merge of #79444 - sasurau4:test/move-const-ip, r=matklad
[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 > div {
1180         float: left;
1181         width: 33.3%;
1182         text-align: center;
1183         font-size: 18px;
1184         cursor: pointer;
1185         border-top: 2px solid;
1186 }
1187
1188 #titles > div:not(:last-child) {
1189         margin-right: 1px;
1190         width: calc(33.3% - 1px);
1191 }
1192
1193 #titles > div > div.count {
1194         display: inline-block;
1195         font-size: 16px;
1196 }
1197
1198 .notable-traits {
1199         cursor: pointer;
1200         z-index: 2;
1201         margin-left: 5px;
1202 }
1203
1204 h4 > .notable-traits {
1205         position: absolute;
1206         left: -44px;
1207         top: 2px;
1208 }
1209
1210 #all-types {
1211         text-align: center;
1212         border: 1px solid;
1213         margin: 0 10px;
1214         margin-bottom: 10px;
1215         display: block;
1216         border-radius: 7px;
1217 }
1218 #all-types > p {
1219         margin: 5px 0;
1220 }
1221
1222 #sidebar-toggle {
1223         position: fixed;
1224         top: 30px;
1225         left: 300px;
1226         z-index: 10;
1227         padding: 3px;
1228         border-top-right-radius: 3px;
1229         border-bottom-right-radius: 3px;
1230         cursor: pointer;
1231         font-weight: bold;
1232         transition: left .5s;
1233         font-size: 1.2em;
1234         border: 1px solid;
1235         border-left: 0;
1236 }
1237 #source-sidebar {
1238         position: fixed;
1239         top: 0;
1240         bottom: 0;
1241         left: 0;
1242         width: 300px;
1243         z-index: 1;
1244         overflow: auto;
1245         transition: left .5s;
1246         border-right: 1px solid;
1247 }
1248 #source-sidebar > .title {
1249         font-size: 1.5em;
1250         text-align: center;
1251         border-bottom: 1px solid;
1252         margin-bottom: 6px;
1253 }
1254
1255 .theme-picker {
1256         position: absolute;
1257         left: 211px;
1258         top: 19px;
1259 }
1260
1261 .theme-picker button {
1262         outline: none;
1263 }
1264
1265 #settings-menu, .help-button {
1266         position: absolute;
1267         top: 10px;
1268 }
1269
1270 #settings-menu {
1271         right: 0;
1272         outline: none;
1273 }
1274
1275 .help-button {
1276         right: 30px;
1277         font-family: "Fira Sans",sans-serif;
1278         text-align: center;
1279         font-size: 17px;
1280 }
1281
1282 #theme-picker, #settings-menu, .help-button {
1283         padding: 4px;
1284         width: 27px;
1285         height: 29px;
1286         border: 1px solid;
1287         border-radius: 3px;
1288         cursor: pointer;
1289 }
1290
1291 #theme-choices {
1292         display: none;
1293         position: absolute;
1294         left: 0;
1295         top: 28px;
1296         border: 1px solid;
1297         border-radius: 3px;
1298         z-index: 1;
1299         cursor: pointer;
1300 }
1301
1302 #theme-choices > button {
1303         border: none;
1304         width: 100%;
1305         padding: 4px 8px;
1306         text-align: center;
1307         background: rgba(0,0,0,0);
1308 }
1309
1310 #theme-choices > button:not(:first-child) {
1311         border-top: 1px solid;
1312 }
1313
1314 /* Media Queries */
1315
1316 @media (min-width: 701px) {
1317         /* In case there is no documentation before a code block, we need to add some margin at the top
1318         to prevent an overlay between the "collapse toggle" and the information tooltip.
1319         However, it's needed needed with smaller screen width because the doc/code block is always put
1320         "one line" below. */
1321         .information:first-child > .tooltip {
1322                 margin-top: 16px;
1323         }
1324 }
1325
1326 @media (max-width: 700px) {
1327         body {
1328                 padding-top: 0px;
1329         }
1330
1331         .rustdoc > .sidebar {
1332                 height: 45px;
1333                 min-height: 40px;
1334                 margin: 0;
1335                 margin-left: -15px;
1336                 padding: 0 15px;
1337                 position: static;
1338                 z-index: 11;
1339         }
1340
1341         .sidebar > .location {
1342                 float: right;
1343                 margin: 0px;
1344                 margin-top: 2px;
1345                 padding: 3px 10px 1px 10px;
1346                 min-height: 39px;
1347                 background: inherit;
1348                 text-align: left;
1349                 font-size: 24px;
1350         }
1351
1352         .sidebar .location:empty {
1353                 padding: 0;
1354         }
1355
1356         .sidebar .logo-container {
1357                 width: 35px;
1358                 height: 35px;
1359                 margin-top: 5px;
1360                 margin-bottom: 5px;
1361                 float: left;
1362                 margin-left: 50px;
1363         }
1364
1365         .sidebar .logo-container > img {
1366                 max-width: 35px;
1367                 max-height: 35px;
1368         }
1369
1370         .sidebar-menu {
1371                 position: fixed;
1372                 z-index: 10;
1373                 font-size: 2rem;
1374                 cursor: pointer;
1375                 width: 45px;
1376                 left: 0;
1377                 text-align: center;
1378                 display: block;
1379                 border-bottom: 1px solid;
1380                 border-right: 1px solid;
1381                 height: 45px;
1382         }
1383
1384         .rustdoc.source > .sidebar > .sidebar-menu {
1385                 display: none;
1386         }
1387
1388         .sidebar-elems {
1389                 position: fixed;
1390                 z-index: 1;
1391                 left: 0;
1392                 top: 45px;
1393                 bottom: 0;
1394                 overflow-y: auto;
1395                 border-right: 1px solid;
1396                 display: none;
1397         }
1398
1399         .sidebar > .block.version {
1400                 border-bottom: none;
1401                 margin-top: 12px;
1402         }
1403
1404         nav.sub {
1405                 width: calc(100% - 32px);
1406                 float: right;
1407         }
1408
1409         .content {
1410                 margin-left: 0px;
1411         }
1412
1413         #main {
1414                 margin-top: 45px;
1415                 padding: 0;
1416         }
1417
1418         .content .in-band {
1419                 width: 100%;
1420         }
1421
1422         .content h4 > .out-of-band {
1423                 position: inherit;
1424         }
1425
1426         .toggle-wrapper > .collapse-toggle {
1427                 left: 0px;
1428         }
1429
1430         .toggle-wrapper {
1431                 height: 1.5em;
1432         }
1433
1434         #search {
1435                 margin-left: 0;
1436         }
1437
1438         .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1439                 display: flex;
1440         }
1441
1442         .anchor {
1443                 display: none !important;
1444         }
1445
1446         h1.fqn {
1447                 overflow: initial;
1448         }
1449
1450         .theme-picker {
1451                 left: 10px;
1452                 top: 54px;
1453                 z-index: 1;
1454         }
1455
1456         h4 > .notable-traits {
1457                 position: absolute;
1458                 left: -22px;
1459                 top: 24px;
1460         }
1461
1462         #titles > div > div.count {
1463                 float: left;
1464                 width: 100%;
1465         }
1466
1467         #titles {
1468                 height: 50px;
1469         }
1470
1471         .sidebar.mobile {
1472                 position: fixed;
1473                 width: 100%;
1474                 margin-left: 0;
1475                 background-color: rgba(0,0,0,0);
1476                 height: 100%;
1477         }
1478         .sidebar {
1479                 width: calc(100% + 30px);
1480         }
1481
1482         .show-it {
1483                 display: block;
1484                 width: 246px;
1485         }
1486
1487         .show-it > .block.items {
1488                 margin: 8px 0;
1489         }
1490
1491         .show-it > .block.items > ul {
1492                 margin: 0;
1493         }
1494
1495         .show-it > .block.items > ul > li {
1496                 text-align: center;
1497                 margin: 2px 0;
1498         }
1499
1500         .show-it > .block.items > ul > li > a {
1501                 font-size: 21px;
1502         }
1503
1504         /* Because of ios, we need to actually have a full height sidebar title so the
1505          * actual sidebar can show up. But then we need to make it transparent so we don't
1506          * hide content. The filler just allows to create the background for the sidebar
1507          * title. But because of the absolute position, I had to lower the z-index.
1508          */
1509         #sidebar-filler {
1510                 position: fixed;
1511                 left: 45px;
1512                 width: calc(100% - 45px);
1513                 top: 0;
1514                 height: 45px;
1515                 z-index: -1;
1516                 border-bottom: 1px solid;
1517         }
1518
1519         .collapse-toggle {
1520                 left: -20px;
1521         }
1522
1523         .impl > .collapse-toggle {
1524                 left: -10px;
1525         }
1526
1527         #all-types {
1528                 margin: 10px;
1529         }
1530
1531         #sidebar-toggle {
1532                 top: 100px;
1533                 width: 30px;
1534                 font-size: 1.5rem;
1535                 text-align: center;
1536                 padding: 0;
1537         }
1538
1539         #source-sidebar {
1540                 z-index: 11;
1541         }
1542
1543         #main > .line-numbers {
1544                 margin-top: 0;
1545         }
1546
1547         .notable-traits .notable-traits-tooltiptext {
1548                 left: 0;
1549                 top: 100%;
1550         }
1551
1552         /* We don't display the help button on mobile devices. */
1553         .help-button {
1554                 display: none;
1555         }
1556         .search-container > div {
1557                 width: calc(100% - 32px);
1558         }
1559 }
1560
1561 @media print {
1562         nav.sub, .content .out-of-band, .collapse-toggle {
1563                 display: none;
1564         }
1565 }
1566
1567 @media (max-width: 416px) {
1568         #titles, #titles > div {
1569                 height: 73px;
1570         }
1571
1572         #main > table:not(.table-display) td {
1573                 word-break: break-word;
1574                 min-width: 10%;
1575         }
1576
1577         .search-container > div {
1578                 display: block;
1579                 width: calc(100% - 37px);
1580         }
1581
1582         #crate-search {
1583                 width: 100%;
1584                 border-radius: 4px;
1585                 border: 0;
1586         }
1587
1588         #crate-search + .search-input {
1589                 width: calc(100% + 71px);
1590                 margin-left: -36px;
1591         }
1592
1593         #theme-picker, #settings-menu {
1594                 padding: 5px;
1595                 width: 31px;
1596                 height: 31px;
1597         }
1598
1599         #theme-picker {
1600                 margin-top: -2px;
1601         }
1602
1603         #settings-menu {
1604                 top: 7px;
1605         }
1606 }
1607
1608 h3.notable {
1609         margin: 0;
1610         margin-bottom: 13px;
1611         font-size: 19px;
1612 }
1613
1614 kbd {
1615         display: inline-block;
1616         padding: 3px 5px;
1617         font: 15px monospace;
1618         line-height: 10px;
1619         vertical-align: middle;
1620         border: solid 1px;
1621         border-radius: 3px;
1622         box-shadow: inset 0 -1px 0;
1623         cursor: default;
1624 }
1625
1626 .hidden-by-impl-hider,
1627 .hidden-by-usual-hider {
1628         /* important because of conflicting rule for small screens */
1629         display: none !important;
1630 }
1631
1632 #implementations-list > h3 > span.in-band {
1633         width: 100%;
1634 }
1635
1636 .table-display {
1637         width: 100%;
1638         border: 0;
1639         border-collapse: collapse;
1640         border-spacing: 0;
1641         font-size: 16px;
1642 }
1643
1644 .table-display tr td:first-child {
1645         padding-right: 0;
1646 }
1647
1648 .table-display tr td:last-child {
1649         float: right;
1650 }
1651 .table-display .out-of-band {
1652         position: relative;
1653         font-size: 19px;
1654         display: block;
1655 }
1656 #implementors-list > .impl-items .table-display .out-of-band {
1657         font-size: 17px;
1658 }
1659
1660 .table-display td:hover .anchor {
1661         display: block;
1662         top: 2px;
1663         left: -5px;
1664 }
1665
1666 #main > ul {
1667         padding-left: 10px;
1668 }
1669 #main > ul > li {
1670         list-style: none;
1671 }
1672
1673 .non-exhaustive {
1674         margin-bottom: 1em;
1675 }
1676
1677 div.children {
1678         padding-left: 27px;
1679         display: none;
1680 }
1681 div.name {
1682         cursor: pointer;
1683         position: relative;
1684         margin-left: 16px;
1685 }
1686 div.files > a {
1687         display: block;
1688         padding: 0 3px;
1689 }
1690 div.files > a:hover, div.name:hover {
1691         background-color: #a14b4b;
1692 }
1693 div.name.expand + .children {
1694         display: block;
1695 }
1696 div.name::before {
1697         content: "\25B6";
1698         padding-left: 4px;
1699         font-size: 0.7em;
1700         position: absolute;
1701         left: -16px;
1702         top: 4px;
1703 }
1704 div.name.expand::before {
1705         transform: rotate(90deg);
1706         left: -15px;
1707         top: 2px;
1708 }
1709
1710 /* This part is to fix the "Expand attributes" part in the type declaration. */
1711 .type-decl > pre > .toggle-wrapper.toggle-attributes.top-attr {
1712         margin-left: 0 !important;
1713 }
1714 .type-decl > pre > .docblock.attributes.top-attr {
1715         margin-left: 1.8em !important;
1716 }
1717 .type-decl > pre > .toggle-attributes {
1718         margin-left: 2.2em;
1719 }
1720 .type-decl > pre > .docblock.attributes {
1721         margin-left: 4em;
1722 }