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