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