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