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