]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/rustdoc.css
use span instead of div for since version
[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: pre-wrap;
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: calc(100% - 2px);
428         border: 1px dashed;
429 }
430
431 .docblock table td {
432         padding: .5em;
433         border: 1px dashed;
434 }
435
436 .docblock table th {
437         padding: .5em;
438         text-align: left;
439         border: 1px solid;
440 }
441
442 .fields + table {
443         margin-bottom: 1em;
444 }
445
446 .content .item-list {
447         list-style-type: none;
448         padding: 0;
449 }
450
451 .content .multi-column {
452         -moz-column-count: 5;
453         -moz-column-gap: 2.5em;
454         -webkit-column-count: 5;
455         -webkit-column-gap: 2.5em;
456         column-count: 5;
457         column-gap: 2.5em;
458 }
459 .content .multi-column li { width: 100%; display: inline-block; }
460
461 .content .method {
462         font-size: 1em;
463         position: relative;
464 }
465 /* Shift "where ..." part of method or fn definition down a line */
466 .content .method .where,
467 .content .fn .where,
468 .content .where.fmt-newline {
469         display: block;
470         font-size: 0.8em;
471 }
472
473 .content .methods > div:not(.important-traits) {
474         margin-left: 40px;
475         margin-bottom: 15px;
476 }
477
478 .content .docblock > .impl-items {
479         margin-left: 20px;
480         margin-top: -34px;
481 }
482 .content .docblock > .impl-items > h4 {
483         border-bottom: 0;
484 }
485 .content .docblock >.impl-items .table-display {
486         margin: 0;
487 }
488 .content .docblock >.impl-items table td {
489         padding: 0;
490 }
491 .toggle-wrapper.marg-left > .collapse-toggle {
492         left: -24px;
493 }
494 .content .docblock > .impl-items .table-display, .impl-items table td {
495         border: none;
496 }
497
498 .content .stability code {
499         font-size: 90%;
500 }
501
502 .content .stability {
503         position: relative;
504         margin-left: 33px;
505         margin-top: -13px;
506 }
507
508 .sub-variant > div > .stability {
509         margin-top: initial;
510 }
511
512 .content .stability::before {
513         content: '˪';
514         font-size: 30px;
515         position: absolute;
516         top: -9px;
517         left: -13px;
518 }
519
520 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
521         margin-left: 20px;
522 }
523
524 .content .impl-items .docblock, .content .impl-items .stability {
525         margin-bottom: .6em;
526 }
527
528 .content .impl-items > .stability {
529         margin-left: 40px;
530 }
531
532 .methods > .stability, .content .impl-items > .stability {
533         margin-top: -8px;
534 }
535
536 .impl-items {
537         flex-basis: 100%;
538 }
539
540 #main > .stability {
541         margin-top: 0;
542 }
543
544 nav {
545         border-bottom: 1px solid;
546         padding-bottom: 10px;
547         margin-bottom: 10px;
548 }
549 nav.main {
550         padding: 20px 0;
551         text-align: center;
552 }
553 nav.main .current {
554         border-top: 1px solid;
555         border-bottom: 1px solid;
556 }
557 nav.main .separator {
558         border: 1px solid;
559         display: inline-block;
560         height: 23px;
561         margin: 0 20px;
562 }
563 nav.sum { text-align: right; }
564 nav.sub form { display: inline; }
565
566 nav.sub, .content {
567         margin-left: 230px;
568 }
569
570 a {
571         text-decoration: none;
572         background: transparent;
573 }
574
575 .small-section-header:hover > .anchor {
576         display: initial;
577 }
578
579 .in-band:hover > .anchor {
580         display: inline-block;
581         position: absolute;
582 }
583 .anchor {
584         display: none;
585         position: absolute;
586         left: -7px;
587 }
588 .anchor.field {
589         left: -5px;
590 }
591 .small-section-header > .anchor {
592         left: -28px;
593         padding-right: 10px; /* avoid gap that causes hover to disappear */
594 }
595 .anchor:before {
596         content: '\2002\00a7\2002';
597 }
598
599 .docblock a:not(.srclink):not(.test-arrow):hover,
600 .docblock-short a:not(.srclink):not(.test-arrow):hover, .stability a {
601         text-decoration: underline;
602 }
603
604 .invisible > .srclink, h4 > code + .srclink {
605         position: absolute;
606         top: 0;
607         right: 0;
608         font-size: 17px;
609         font-weight: normal;
610 }
611
612 .block a.current.crate { font-weight: 500; }
613
614 .search-container {
615         position: relative;
616 }
617 .search-container > div {
618         display: inline-flex;
619         width: calc(100% - 34px);
620 }
621 #crate-search {
622         margin-top: 5px;
623         padding: 6px;
624         padding-right: 19px;
625         border: 0;
626         border-right: 0;
627         border-radius: 4px 0 0 4px;
628         outline: none;
629         cursor: pointer;
630         border-right: 1px solid;
631         -moz-appearance: none;
632         -webkit-appearance: none;
633         /* Removes default arrow from firefox */
634         text-indent: 0.01px;
635         text-overflow: "";
636         background-repeat: no-repeat;
637         background-color: transparent;
638         background-size: 20px;
639         background-position: calc(100% - 1px) 56%;
640 }
641 .search-container > .top-button {
642         position: absolute;
643         right: 0;
644         top: 10px;
645 }
646 .search-input {
647         /* Override Normalize.css: we have margins and do
648          not want to overflow - the `moz` attribute is necessary
649          until Firefox 29, too early to drop at this point */
650         -moz-box-sizing: border-box !important;
651         box-sizing: border-box !important;
652         outline: none;
653         border: none;
654         border-radius: 1px;
655         margin-top: 5px;
656         padding: 10px 16px;
657         font-size: 17px;
658         transition: border-color 300ms ease;
659         transition: border-radius 300ms ease-in-out;
660         transition: box-shadow 300ms ease-in-out;
661         width: calc(100% - 32px);
662 }
663
664 #crate-search + .search-input {
665         border-radius: 0 1px 1px 0;
666 }
667
668 .search-input:focus {
669         border-radius: 2px;
670         border: 0;
671         outline: 0;
672         box-shadow: 0 0 8px #078dd8;
673 }
674
675 .search-results .desc {
676         white-space: nowrap;
677         text-overflow: ellipsis;
678         overflow: hidden;
679         display: block;
680 }
681
682 .search-results a {
683         display: block;
684 }
685
686 .content .search-results td:first-child {
687         padding-right: 0;
688         width: 50%;
689 }
690 .content .search-results td:first-child a {
691         padding-right: 10px;
692 }
693 .content .search-results td:first-child a:after {
694         clear: both;
695         content: "";
696         display: block;
697 }
698 .content .search-results td:first-child a span {
699         float: left;
700 }
701
702 tr.result span.primitive::after {
703         content: ' (primitive type)';
704         font-style: italic;
705 }
706
707 tr.result span.keyword::after {
708         content: ' (keyword)';
709         font-style: italic;
710 }
711
712 body.blur > :not(#help) {
713         filter: blur(8px);
714         -webkit-filter: blur(8px);
715         opacity: .7;
716 }
717
718 #help {
719         width: 100%;
720         height: 100vh;
721         position: fixed;
722         top: 0;
723         left: 0;
724         display: flex;
725         justify-content: center;
726         align-items: center;
727 }
728 #help > div {
729         flex: 0 0 auto;
730         box-shadow: 0 0 6px rgba(0,0,0,.2);
731         width: 550px;
732         height: auto;
733         border: 1px solid;
734 }
735 #help dt {
736         float: left;
737         clear: left;
738         display: block;
739 }
740 #help dd { margin: 5px 35px; }
741 #help .infos { padding-left: 0; }
742 #help h1, #help h2 { margin-top: 0; }
743 #help > div div {
744         width: 50%;
745         float: left;
746         padding: 20px;
747         padding-left: 17px;
748 }
749
750 .stab {
751         display: table;
752         border-width: 1px;
753         border-style: solid;
754         padding: 3px;
755         margin-bottom: 5px;
756         font-size: 90%;
757 }
758 .stab p {
759         display: inline;
760 }
761
762 .stab summary {
763         display: list-item;
764 }
765
766 .stab .emoji {
767         font-size: 1.5em;
768 }
769
770 .module-item .stab {
771         border-radius: 3px;
772         display: inline-block;
773         font-size: 80%;
774         line-height: 1.2;
775         margin-bottom: 0;
776         margin-right: .3em;
777         padding: 2px;
778         vertical-align: text-bottom;
779 }
780
781 .module-item.unstable {
782         opacity: 0.65;
783 }
784
785 .since {
786         font-weight: normal;
787         font-size: initial;
788         position: absolute;
789         right: 0;
790         top: 0;
791 }
792
793 .impl-items .since, .impl .since {
794         flex-grow: 0;
795         padding-left: 12px;
796         padding-right: 2px;
797         position: initial;
798 }
799
800 .impl-items .srclink, .impl .srclink {
801         flex-grow: 0;
802         /* Override header settings otherwise it's too bold */
803         font-size: 17px;
804         font-weight: normal;
805 }
806
807 .impl-items code, .impl code {
808         flex-grow: 1;
809 }
810
811 .impl-items h4, h4.impl, h3.impl {
812         display: flex;
813         flex-basis: 100%;
814         font-size: 16px;
815         margin-bottom: 12px;
816         /* Push the src link out to the right edge consistently */
817         justify-content: space-between;
818 }
819
820 .variants_table {
821         width: 100%;
822 }
823
824 .variants_table tbody tr td:first-child {
825         width: 1%; /* make the variant name as small as possible */
826 }
827
828 td.summary-column {
829         width: 100%;
830 }
831
832 .summary {
833         padding-right: 0px;
834 }
835
836 pre.rust .question-mark {
837         font-weight: bold;
838 }
839
840 a.test-arrow {
841         display: inline-block;
842         position: absolute;
843         padding: 5px 10px 5px 10px;
844         border-radius: 5px;
845         font-size: 130%;
846         top: 5px;
847         right: 5px;
848 }
849 a.test-arrow:hover{
850         text-decoration: none;
851 }
852
853 .section-header:hover a:before {
854         position: absolute;
855         left: -25px;
856         padding-right: 10px; /* avoid gap that causes hover to disappear */
857         content: '\2002\00a7\2002';
858 }
859
860 .section-header:hover a {
861         text-decoration: none;
862 }
863
864 .section-header a {
865         color: inherit;
866 }
867
868 .collapse-toggle {
869         font-weight: 300;
870         position: absolute;
871         left: -23px;
872         top: 0;
873 }
874
875 h3 > .collapse-toggle, h4 > .collapse-toggle {
876         font-size: 0.8em;
877         top: 5px;
878 }
879
880 .toggle-wrapper > .collapse-toggle {
881         left: -24px;
882         margin-top: 0px;
883 }
884
885 .toggle-wrapper {
886         position: relative;
887         margin-top: 0;
888 }
889
890 .toggle-wrapper.collapsed {
891         height: 25px;
892         transition: height .2s;
893         margin-bottom: .6em;
894 }
895
896 .collapse-toggle > .inner {
897         display: inline-block;
898         width: 1.2ch;
899         text-align: center;
900 }
901
902 .collapse-toggle.hidden-default {
903         position: relative;
904         margin-left: 20px;
905 }
906
907 .since + .srclink {
908         display: table-cell;
909         padding-left: 10px;
910 }
911
912 .item-spacer {
913         width: 100%;
914         height: 12px;
915 }
916
917 .out-of-band > span.since {
918         position: initial;
919         font-size: 20px;
920         margin-right: 5px;
921 }
922
923 .toggle-wrapper > .collapse-toggle {
924         left: 0;
925 }
926
927 .variant + .toggle-wrapper + .docblock > p {
928         margin-top: 5px;
929 }
930
931 .sub-variant, .sub-variant > h3 {
932         margin-top: 1px !important;
933 }
934
935 #main > .sub-variant > h3 {
936         font-size: 15px;
937         margin-left: 25px;
938         margin-bottom: 5px;
939 }
940
941 .sub-variant > div {
942         margin-left: 20px;
943         margin-bottom: 10px;
944 }
945
946 .sub-variant > div > span {
947         display: block;
948         position: relative;
949 }
950
951 .toggle-label {
952         display: inline-block;
953         margin-left: 4px;
954         margin-top: 3px;
955 }
956
957 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
958         margin-left: 30px;
959         margin-bottom: 20px;
960         margin-top: 5px;
961 }
962
963 .docblock > .section-header:first-child {
964         margin-left: 15px;
965         margin-top: 0;
966 }
967
968 .docblock > .section-header:first-child:hover > a:before {
969         left: -10px;
970 }
971
972 .enum > .collapsed, .struct > .collapsed {
973         margin-bottom: 25px;
974 }
975
976 #main > .variant, #main > .structfield {
977         display: block;
978 }
979
980 .attributes {
981         display: block;
982         margin-top: 0px !important;
983         margin-right: 0px;
984         margin-bottom: 0px !important;
985         margin-left: 30px;
986 }
987 .toggle-attributes.collapsed {
988         margin-bottom: 0;
989 }
990 .impl-items > .toggle-attributes {
991         margin-left: 20px;
992 }
993 .impl-items .attributes {
994         font-weight: 500;
995 }
996
997 :target > code {
998         opacity: 1;
999 }
1000
1001 /* Media Queries */
1002
1003 @media (max-width: 700px) {
1004         body {
1005                 padding-top: 0px;
1006         }
1007
1008         .rustdoc > .sidebar {
1009                 height: 45px;
1010                 min-height: 40px;
1011                 margin: 0;
1012                 margin-left: -15px;
1013                 padding: 0 15px;
1014                 position: static;
1015                 z-index: 11;
1016         }
1017
1018         .sidebar > .location {
1019                 float: right;
1020                 margin: 0px;
1021                 margin-top: 2px;
1022                 padding: 3px 10px 1px 10px;
1023                 min-height: 39px;
1024                 background: inherit;
1025                 text-align: left;
1026                 font-size: 24px;
1027         }
1028
1029         .sidebar .location:empty {
1030                 padding: 0;
1031         }
1032
1033         .sidebar img {
1034                 width: 35px;
1035                 margin-top: 5px;
1036                 margin-bottom: 5px;
1037                 float: left;
1038                 margin-left: 50px;
1039         }
1040
1041         .sidebar-menu {
1042                 position: fixed;
1043                 z-index: 10;
1044                 font-size: 2rem;
1045                 cursor: pointer;
1046                 width: 45px;
1047                 left: 0;
1048                 text-align: center;
1049                 display: block;
1050                 border-bottom: 1px solid;
1051                 border-right: 1px solid;
1052                 height: 45px;
1053         }
1054
1055         .sidebar-elems {
1056                 position: fixed;
1057                 z-index: 1;
1058                 left: 0;
1059                 top: 45px;
1060                 bottom: 0;
1061                 overflow-y: auto;
1062                 border-right: 1px solid;
1063                 display: none;
1064         }
1065
1066         .sidebar > .block.version {
1067                 border-bottom: none;
1068                 margin-top: 12px;
1069         }
1070
1071         nav.sub {
1072                 width: calc(100% - 32px);
1073                 float: right;
1074         }
1075
1076         .content {
1077                 margin-left: 0px;
1078         }
1079
1080         #main {
1081                 margin-top: 45px;
1082                 padding: 0;
1083         }
1084
1085         .content .in-band {
1086                 width: 100%;
1087         }
1088
1089         .content h4 > .out-of-band {
1090                 position: inherit;
1091         }
1092
1093         .toggle-wrapper > .collapse-toggle {
1094                 left: 0px;
1095         }
1096
1097         .toggle-wrapper {
1098                 height: 1.5em;
1099         }
1100
1101         #search {
1102                 margin-left: 0;
1103         }
1104
1105         .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
1106                 display: flex;
1107         }
1108
1109         .anchor {
1110                 display: none !important;
1111         }
1112
1113         h1.fqn {
1114                 overflow: initial;
1115         }
1116
1117         #main > .line-numbers {
1118                 margin-top: 0;
1119         }
1120 }
1121
1122 @media print {
1123         nav.sub, .content .out-of-band, .collapse-toggle {
1124                 display: none;
1125         }
1126 }
1127
1128 .information {
1129         position: absolute;
1130         left: -20px;
1131         margin-top: 7px;
1132         z-index: 1;
1133 }
1134
1135 .tooltip {
1136         position: relative;
1137         display: inline-block;
1138         cursor: pointer;
1139 }
1140
1141 .tooltip .tooltiptext {
1142         width: 120px;
1143         display: none;
1144         text-align: center;
1145         padding: 5px 3px;
1146         border-radius: 6px;
1147         margin-left: 5px;
1148         top: -5px;
1149         left: 105%;
1150         z-index: 10;
1151 }
1152
1153 .tooltip:hover .tooltiptext {
1154         display: inline;
1155 }
1156
1157 .tooltip .tooltiptext::after {
1158         content: " ";
1159         position: absolute;
1160         top: 50%;
1161         left: 11px;
1162         margin-top: -5px;
1163         border-width: 5px;
1164         border-style: solid;
1165 }
1166
1167 .important-traits .tooltip .tooltiptext {
1168         border: 1px solid;
1169 }
1170
1171 pre.rust {
1172         position: relative;
1173         tab-width: 4;
1174         -moz-tab-width: 4;
1175 }
1176
1177 .search-failed {
1178         text-align: center;
1179         margin-top: 20px;
1180 }
1181
1182 .search-failed > ul {
1183         text-align: left;
1184         max-width: 570px;
1185         margin-left: auto;
1186         margin-right: auto;
1187 }
1188
1189 #titles {
1190         height: 35px;
1191 }
1192
1193 #titles > div {
1194         float: left;
1195         width: 33.3%;
1196         text-align: center;
1197         font-size: 18px;
1198         cursor: pointer;
1199         border-top: 2px solid;
1200 }
1201
1202 #titles > div:not(:last-child) {
1203         margin-right: 1px;
1204         width: calc(33.3% - 1px);
1205 }
1206
1207 #titles > div > div.count {
1208         display: inline-block;
1209         font-size: 16px;
1210 }
1211
1212 .important-traits {
1213         cursor: pointer;
1214         z-index: 2;
1215 }
1216
1217 h4 > .important-traits {
1218         position: absolute;
1219         left: -44px;
1220         top: 2px;
1221 }
1222
1223 #all-types {
1224         text-align: center;
1225         border: 1px solid;
1226         margin: 0 10px;
1227         margin-bottom: 10px;
1228         display: block;
1229         border-radius: 7px;
1230 }
1231 #all-types > p {
1232         margin: 5px 0;
1233 }
1234
1235 @media (max-width: 700px) {
1236         h4 > .important-traits {
1237                 position: absolute;
1238                 left: -22px;
1239                 top: 24px;
1240         }
1241
1242         #titles > div > div.count {
1243                 float: left;
1244                 width: 100%;
1245         }
1246
1247         #titles {
1248                 height: 50px;
1249         }
1250
1251         .sidebar.mobile {
1252                 position: fixed;
1253                 width: 100%;
1254                 margin-left: 0;
1255                 background-color: rgba(0,0,0,0);
1256                 height: 100%;
1257         }
1258         .sidebar {
1259                 width: calc(100% + 30px);
1260         }
1261
1262         .show-it {
1263                 display: block;
1264                 width: 246px;
1265         }
1266
1267         .show-it > .block.items {
1268                 margin: 8px 0;
1269         }
1270
1271         .show-it > .block.items > ul {
1272                 margin: 0;
1273         }
1274
1275         .show-it > .block.items > ul > li {
1276                 text-align: center;
1277                 margin: 2px 0;
1278         }
1279
1280         .show-it > .block.items > ul > li > a {
1281                 font-size: 21px;
1282         }
1283
1284         /* Because of ios, we need to actually have a full height sidebar title so the
1285          * actual sidebar can show up. But then we need to make it transparent so we don't
1286          * hide content. The filler just allows to create the background for the sidebar
1287          * title. But because of the absolute position, I had to lower the z-index.
1288          */
1289         #sidebar-filler {
1290                 position: fixed;
1291                 left: 45px;
1292                 width: calc(100% - 45px);
1293                 top: 0;
1294                 height: 45px;
1295                 z-index: -1;
1296                 border-bottom: 1px solid;
1297         }
1298
1299         .collapse-toggle {
1300                 left: -20px;
1301         }
1302
1303         .impl > .collapse-toggle {
1304                 left: -10px;
1305         }
1306
1307         #all-types {
1308                 margin: 10px;
1309         }
1310 }
1311
1312
1313 @media (max-width: 416px) {
1314         #titles {
1315                 height: 73px;
1316         }
1317
1318         #titles > div {
1319                 height: 73px;
1320         }
1321 }
1322
1323 .modal {
1324         position: fixed;
1325         width: 100vw;
1326         height: 100vh;
1327         z-index: 10000;
1328         top: 0;
1329         left: 0;
1330 }
1331
1332 .modal-content {
1333         display: block;
1334         max-width: 60%;
1335         min-width: 200px;
1336         padding: 8px;
1337         top: 40%;
1338         position: absolute;
1339         left: 50%;
1340         transform: translate(-50%, -40%);
1341         border: 1px solid;
1342         border-radius: 4px;
1343         border-top-right-radius: 0;
1344 }
1345
1346 .modal-content > .docblock {
1347         margin: 0;
1348 }
1349
1350 h3.important {
1351         margin: 0;
1352         margin-bottom: 13px;
1353         font-size: 19px;
1354 }
1355
1356 .modal-content > .docblock > code.content {
1357         margin: 0;
1358         padding: 0;
1359         font-size: 20px;
1360 }
1361
1362 .modal-content > .close {
1363         position: absolute;
1364         font-weight: 900;
1365         right: -25px;
1366         top: -1px;
1367         font-size: 18px;
1368         width: 25px;
1369         padding-right: 2px;
1370         border-top-right-radius: 5px;
1371         border-bottom-right-radius: 5px;
1372         text-align: center;
1373         border: 1px solid;
1374         border-right: 0;
1375         cursor: pointer;
1376 }
1377
1378 .modal-content > .whiter {
1379         height: 25px;
1380         position: absolute;
1381         width: 3px;
1382         right: -2px;
1383         top: 0px;
1384 }
1385
1386 #main > div.important-traits {
1387         position: absolute;
1388         left: -24px;
1389         margin-top: 16px;
1390 }
1391
1392 .content > .methods > .method > div.important-traits {
1393         position: absolute;
1394         font-weight: 400;
1395         left: -42px;
1396         margin-top: 2px;
1397 }
1398
1399 kbd {
1400         display: inline-block;
1401         padding: 3px 5px;
1402         font: 15px monospace;
1403         line-height: 10px;
1404         vertical-align: middle;
1405         border: solid 1px;
1406         border-radius: 3px;
1407         box-shadow: inset 0 -1px 0;
1408         cursor: default;
1409 }
1410
1411 .theme-picker {
1412         position: absolute;
1413         left: 211px;
1414         top: 19px;
1415 }
1416
1417 .theme-picker button {
1418         outline: none;
1419 }
1420
1421 #settings-menu {
1422         position: absolute;
1423         right: 0;
1424         top: 10px;
1425         outline: none;
1426 }
1427
1428 #theme-picker, #settings-menu {
1429         padding: 4px;
1430         width: 27px;
1431         height: 29px;
1432         border: 1px solid;
1433         border-radius: 3px;
1434         cursor: pointer;
1435 }
1436
1437 #theme-choices {
1438         display: none;
1439         position: absolute;
1440         left: 0;
1441         top: 28px;
1442         border: 1px solid;
1443         border-radius: 3px;
1444         z-index: 1;
1445         cursor: pointer;
1446 }
1447
1448 #theme-choices > button {
1449         border: none;
1450         width: 100%;
1451         padding: 4px;
1452         text-align: center;
1453         background: rgba(0,0,0,0);
1454 }
1455
1456 #theme-choices > button:not(:first-child) {
1457         border-top: 1px solid;
1458 }
1459
1460 @media (max-width: 700px) {
1461         .theme-picker {
1462                 left: 10px;
1463                 top: 54px;
1464                 z-index: 1;
1465         }
1466 }
1467
1468 .hidden-by-impl-hider,
1469 .hidden-by-usual-hider {
1470         /* important because of conflicting rule for small screens */
1471         display: none !important;
1472 }
1473
1474 #implementations-list > h3 > span.in-band {
1475         width: 100%;
1476 }
1477
1478 .table-display {
1479         width: 100%;
1480         border: 0;
1481         border-collapse: collapse;
1482         border-spacing: 0;
1483         font-size: 16px;
1484 }
1485
1486 .table-display tr td:first-child {
1487         padding-right: 0;
1488 }
1489
1490 .table-display tr td:last-child {
1491         float: right;
1492 }
1493 .table-display .out-of-band {
1494         position: relative;
1495         font-size: 19px;
1496         display: block;
1497 }
1498 #implementors-list > .impl-items .table-display .out-of-band {
1499         font-size: 17px;
1500 }
1501
1502 .table-display td:hover .anchor {
1503         display: block;
1504         top: 2px;
1505         left: -5px;
1506 }
1507
1508 #main > ul {
1509         padding-left: 10px;
1510 }
1511 #main > ul > li {
1512         list-style: none;
1513 }
1514
1515 .non-exhaustive {
1516         margin-bottom: 1em;
1517 }
1518
1519 #sidebar-toggle {
1520         position: fixed;
1521         top: 30px;
1522         left: 300px;
1523         z-index: 10;
1524         padding: 3px;
1525         border-top-right-radius: 3px;
1526         border-bottom-right-radius: 3px;
1527         cursor: pointer;
1528         font-weight: bold;
1529         transition: left .5s;
1530         font-size: 1.2em;
1531         border: 1px solid;
1532         border-left: 0;
1533 }
1534 #source-sidebar {
1535         position: fixed;
1536         top: 0;
1537         bottom: 0;
1538         left: 0;
1539         width: 300px;
1540         z-index: 1;
1541         overflow: auto;
1542         transition: left .5s;
1543         border-right: 1px solid;
1544 }
1545 #source-sidebar > .title {
1546         font-size: 1.5em;
1547         text-align: center;
1548         border-bottom: 1px solid;
1549         margin-bottom: 6px;
1550 }
1551
1552 div.children {
1553         padding-left: 27px;
1554         display: none;
1555 }
1556 div.name {
1557         cursor: pointer;
1558         position: relative;
1559         margin-left: 16px;
1560 }
1561 div.files > a {
1562         display: block;
1563         padding: 0 3px;
1564 }
1565 div.files > a:hover, div.name:hover {
1566         background-color: #a14b4b;
1567 }
1568 div.name.expand + .children {
1569         display: block;
1570 }
1571 div.name::before {
1572         content: "\25B6";
1573         padding-left: 4px;
1574         font-size: 0.7em;
1575         position: absolute;
1576         left: -16px;
1577         top: 4px;
1578 }
1579 div.name.expand::before {
1580         transform: rotate(90deg);
1581         left: -15px;
1582         top: 2px;
1583 }
1584
1585 /* This part is to fix the "Expand attributes" part in the type declaration. */
1586 .type-decl > pre > :first-child {
1587         margin-left: 0 !important;
1588 }
1589 .type-decl > pre > :nth-child(2) {
1590         margin-left: 1.8em !important;
1591 }
1592 .type-decl > pre > .toggle-attributes {
1593         margin-left: 2.2em;
1594 }
1595 .type-decl > pre > .docblock.attributes {
1596         margin-left: 4em;
1597 }