]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/css/rustdoc.css
Rollup merge of #92404 - GuillaumeGomez:src-font-size, r=jsha
[rust.git] / src / librustdoc / html / static / css / 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'),
7                 url("FiraSans-Regular.woff2") format("woff2"),
8                 url("FiraSans-Regular.woff") format('woff');
9         font-display: swap;
10 }
11 @font-face {
12         font-family: 'Fira Sans';
13         font-style: normal;
14         font-weight: 500;
15         src: local('Fira Sans Medium'),
16                 url("FiraSans-Medium.woff2") format("woff2"),
17                 url("FiraSans-Medium.woff") format('woff');
18         font-display: swap;
19 }
20
21 /* See SourceSerif4-LICENSE.md for the Source Serif 4 license. */
22 @font-face {
23         font-family: 'Source Serif 4';
24         font-style: normal;
25         font-weight: 400;
26         src: local('Source Serif 4'),
27                 url("SourceSerif4-Regular.ttf.woff2") format("woff2"),
28                 url("SourceSerif4-Regular.ttf.woff") format("woff");
29         font-display: swap;
30 }
31 @font-face {
32         font-family: 'Source Serif 4';
33         font-style: italic;
34         font-weight: 400;
35         src: local('Source Serif 4 Italic'),
36                 url("SourceSerif4-It.ttf.woff2") format("woff2"),
37                 url("SourceSerif4-It.ttf.woff") format("woff");
38         font-display: swap;
39 }
40 @font-face {
41         font-family: 'Source Serif 4';
42         font-style: normal;
43         font-weight: 700;
44         src: local('Source Serif 4 Bold'),
45                 url("SourceSerif4-Bold.ttf.woff2") format("woff2"),
46                 url("SourceSerif4-Bold.ttf.woff") format("woff");
47         font-display: swap;
48 }
49
50 /* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
51 @font-face {
52         font-family: 'Source Code Pro';
53         font-style: normal;
54         font-weight: 400;
55         /* Avoid using locally installed font because bad versions are in circulation:
56          * see https://github.com/rust-lang/rust/issues/24355 */
57         src: url("SourceCodePro-Regular.ttf.woff2") format("woff2"),
58                 url("SourceCodePro-Regular.ttf.woff") format("woff");
59         font-display: swap;
60 }
61 @font-face {
62         font-family: 'Source Code Pro';
63         font-style: italic;
64         font-weight: 400;
65         src: url("SourceCodePro-It.ttf.woff2") format("woff2"),
66                 url("SourceCodePro-It.ttf.woff") format("woff");
67         font-display: swap;
68 }
69 @font-face {
70         font-family: 'Source Code Pro';
71         font-style: normal;
72         font-weight: 600;
73         src: url("SourceCodePro-Semibold.ttf.woff2") format("woff2"),
74                 url("SourceCodePro-Semibold.ttf.woff") format("woff");
75         font-display: swap;
76 }
77
78 /* Avoid using legacy CJK serif fonts in Windows like Batang. */
79 @font-face {
80         font-family: 'NanumBarunGothic';
81         src: url("NanumBarunGothic.ttf.woff2") format("woff2"),
82                 url("NanumBarunGothic.ttf.woff") format("woff");
83         font-display: swap;
84         unicode-range: U+AC00-D7AF, U+1100-11FF, U+3130-318F, U+A960-A97F, U+D7B0-D7FF;
85 }
86
87 * {
88         -webkit-box-sizing: border-box;
89         -moz-box-sizing: border-box;
90         box-sizing: border-box;
91 }
92
93 /* This part handles the "default" theme being used depending on the system one. */
94 html {
95         content: "";
96 }
97 @media (prefers-color-scheme: light) {
98         html {
99                 content: "light";
100         }
101 }
102 @media (prefers-color-scheme: dark) {
103         html {
104                 content: "dark";
105         }
106 }
107
108 /* General structure and fonts */
109
110 body {
111         font: 1rem/1.4 "Source Serif 4", NanumBarunGothic, serif;
112         margin: 0;
113         position: relative;
114
115         -webkit-font-feature-settings: "kern", "liga";
116         -moz-font-feature-settings: "kern", "liga";
117         font-feature-settings: "kern", "liga";
118 }
119
120 h1 {
121         font-size: 1.5rem;
122 }
123 h2 {
124         font-size: 1.4rem;
125 }
126 h3 {
127         font-size: 1.3rem;
128 }
129 h1, h2, h3, h4, h5, h6 {
130         font-weight: 500;
131 }
132 h1, h2, h3, h4 {
133         margin: 20px 0 15px 0;
134         padding-bottom: 6px;
135 }
136 .docblock h3, .docblock h4, h5, h6 {
137         margin: 15px 0 5px 0;
138 }
139 h1.fqn {
140         display: flex;
141         border-bottom: 1px dashed;
142         margin-top: 0;
143
144         /* workaround to keep flex from breaking below 700 px width due to the float: right on the nav
145            above the h1 */
146         padding-left: 1px;
147 }
148 h1.fqn > .in-band > a:hover {
149         text-decoration: underline;
150 }
151 /* The only headings that get underlines are:
152          Markdown-generated headings within the top-doc
153          Rustdoc-generated h2 section headings (e.g. "Implementations", "Required Methods", etc)
154         Underlines elsewhere in the documentation break up visual flow and tend to invert
155         section hierarchies. */
156 h2,
157 .top-doc h3,
158 .top-doc h4,
159 .sidebar .others h3 {
160         border-bottom: 1px solid;
161 }
162 h3.code-header {
163         font-size: 1.1rem;
164 }
165 h4.code-header {
166         font-size: 1rem;
167 }
168 h3.code-header, h4.code-header {
169         font-weight: 600;
170         border-bottom-style: none;
171         padding: 0;
172         margin: 0;
173 }
174 .impl,
175 .impl-items .method,
176 .methods .method,
177 .impl-items .type,
178 .methods .type,
179 .impl-items .associatedconstant,
180 .methods .associatedconstant,
181 .impl-items .associatedtype,
182 .methods .associatedtype {
183         flex-basis: 100%;
184         font-weight: 600;
185         margin-top: 16px;
186         margin-bottom: 10px;
187         position: relative;
188 }
189
190 div.impl-items > div {
191         padding-left: 0;
192 }
193
194 h1, h2, h3, h4, h5, h6,
195 .sidebar, a.source, .search-input, .search-results .result-name,
196 .content table td:first-child > a,
197 .item-left > a,
198 div.item-list .out-of-band, span.since,
199 #source-sidebar, #sidebar-toggle,
200 details.rustdoc-toggle > summary::before,
201 div.impl-items > div:not(.docblock):not(.item-info),
202 .content ul.crate a.crate, a.srclink,
203 /* This selector is for the items listed in the "all items" page. */
204 #main-content > ul.docblock > li > a {
205         font-family: "Fira Sans", Arial, NanumBarunGothic, sans-serif;
206 }
207
208 .content ul.crate a.crate {
209         font-size: 1rem/1.6;
210 }
211
212 ol, ul {
213         padding-left: 25px;
214 }
215 ul ul, ol ul, ul ol, ol ol {
216         margin-bottom: .6em;
217 }
218
219 p {
220         margin: 0 0 .6em 0;
221 }
222
223 summary {
224         outline: none;
225 }
226
227 /* Fix some style changes due to normalize.css 8 */
228
229 td,
230 th {
231         padding: 0;
232 }
233
234 table {
235         border-collapse: collapse;
236 }
237
238 button,
239 input,
240 optgroup,
241 select,
242 textarea {
243         color: inherit;
244         font: inherit;
245         margin: 0;
246 }
247
248 /* end tweaks for normalize.css 8 */
249
250 .rustdoc {
251         display: flex;
252         flex-direction: row;
253         flex-wrap: nowrap;
254 }
255
256 main {
257         position: relative;
258         flex-grow: 1;
259         padding: 10px 15px 40px 45px;
260         min-width: 0;
261 }
262
263 .source main {
264         padding: 15px;
265 }
266
267 .width-limiter {
268         max-width: 960px;
269         margin-right: auto;
270 }
271
272 .source .width-limiter {
273         max-width: unset;
274 }
275
276 details:not(.rustdoc-toggle) summary {
277         margin-bottom: .6em;
278 }
279
280 code, pre, a.test-arrow, .code-header {
281         font-family: "Source Code Pro", monospace;
282 }
283 .docblock code, .docblock-short code {
284         border-radius: 3px;
285         padding: 0 0.1em;
286 }
287 .docblock pre code, .docblock-short pre code {
288         padding: 0;
289 }
290 pre {
291         padding: 14px;
292 }
293 .docblock.item-decl {
294         margin-left: 0;
295 }
296 .item-decl pre {
297         overflow-x: auto;
298 }
299
300 .source .content pre {
301         padding: 20px;
302 }
303
304 img {
305         max-width: 100%;
306 }
307
308 li {
309         position: relative;
310 }
311
312 .source .content {
313         max-width: none;
314         overflow: visible;
315         margin-left: 0px;
316 }
317
318 nav.sub {
319         position: relative;
320         font-size: 1rem;
321         text-transform: uppercase;
322 }
323
324 .sub-container {
325         display: flex;
326         flex-direction: row;
327         flex-wrap: nowrap;
328 }
329
330 .sub-logo-container {
331         display: none;
332         margin-right: 20px;
333 }
334
335 .source .sub-logo-container {
336         display: block;
337 }
338
339 .source .sub-logo-container > img {
340         height: 60px;
341         width: 60px;
342         object-fit: contain;
343 }
344
345 .sidebar {
346         width: 200px;
347         overflow-y: scroll;
348         position: sticky;
349         min-width: 200px;
350         height: 100vh;
351         top: 0;
352         left: 0;
353 }
354
355 .rustdoc.source .sidebar {
356         width: 50px;
357         min-width: 0px;
358         max-width: 300px;
359         flex-grow: 0;
360         flex-shrink: 0;
361         flex-basis: auto;
362         border-right: 1px solid;
363         overflow-x: hidden;
364         /* The sidebar is by default hidden  */
365         overflow-y: hidden;
366 }
367
368 .source .sidebar > *:not(:first-child) {
369         transition: opacity 0.5s, visibility 0.2s;
370         opacity: 0;
371         visibility: hidden;
372 }
373
374 .source .sidebar.expanded {
375         overflow-y: auto;
376 }
377
378 .source .sidebar.expanded > * {
379         opacity: 1;
380         visibility: visible;
381 }
382
383 /* Improve the scrollbar display on firefox */
384 * {
385         scrollbar-width: initial;
386 }
387 .sidebar {
388         scrollbar-width: thin;
389 }
390
391 /* Improve the scrollbar display on webkit-based browsers */
392 ::-webkit-scrollbar {
393         width: 12px;
394 }
395 .sidebar::-webkit-scrollbar {
396         width: 8px;
397 }
398 ::-webkit-scrollbar-track {
399         -webkit-box-shadow: inset 0;
400 }
401
402 .sidebar .block > ul > li {
403         margin-right: -10px;
404 }
405
406 /* Everything else */
407
408 .hidden {
409         display: none !important;
410 }
411
412 .logo-container {
413         display: flex;
414         margin-top: 10px;
415         margin-bottom: 10px;
416         justify-content: center;
417 }
418
419 .logo-container > img {
420         height: 100px;
421         width: 100px;
422 }
423
424 .sidebar .location {
425         border: 1px solid;
426         font-size: 1.0625rem;
427         margin: 30px 10px 20px 10px;
428         text-align: center;
429         word-wrap: break-word;
430         font-weight: inherit;
431         padding: 0;
432 }
433
434 .sidebar .version {
435         font-size: 0.9375rem;
436         text-align: center;
437         border-bottom: 1px solid;
438         overflow-wrap: break-word;
439         word-wrap: break-word; /* deprecated */
440         word-break: break-word; /* Chrome, non-standard */
441 }
442
443 .location:empty {
444         border: none;
445 }
446
447 .location a:first-of-type {
448         font-weight: 500;
449 }
450 .location a:hover {
451         text-decoration: underline;
452 }
453
454 .block {
455         padding: 0;
456         margin-bottom: 14px;
457 }
458 .block h2, .block h3 {
459         text-align: center;
460 }
461 .block ul, .block li {
462         margin: 0 10px;
463         padding: 0;
464         list-style: none;
465 }
466
467 .block a {
468         display: block;
469         text-overflow: ellipsis;
470         overflow: hidden;
471         line-height: 15px;
472         padding: 7px 5px;
473         font-size: 0.875rem;
474         font-weight: 300;
475         transition: border 500ms ease-out;
476 }
477
478 .sidebar-title {
479         border-top: 1px solid;
480         border-bottom: 1px solid;
481         text-align: center;
482         font-size: 1.0625rem;
483         margin-bottom: 5px;
484         font-weight: inherit;
485         padding: 0;
486 }
487
488 .sidebar-links {
489         margin-bottom: 15px;
490 }
491
492 .sidebar-links > a {
493         padding-left: 10px;
494         width: 100%;
495 }
496
497 .sidebar-menu {
498         display: none;
499 }
500
501 .source .content pre.rust {
502         white-space: pre;
503         overflow: auto;
504         padding-left: 0;
505 }
506
507 .rustdoc .example-wrap {
508         display: inline-flex;
509         margin-bottom: 10px;
510 }
511
512 .example-wrap {
513         position: relative;
514         width: 100%;
515 }
516
517 .example-wrap > pre.line-number {
518         overflow: initial;
519         border: 1px solid;
520         padding: 13px 8px;
521         text-align: right;
522         border-top-left-radius: 5px;
523         border-bottom-left-radius: 5px;
524 }
525
526 .example-wrap > pre.rust a:hover {
527         text-decoration: underline;
528 }
529
530 .rustdoc:not(.source) .example-wrap > pre:not(.line-number) {
531         width: 100%;
532         overflow-x: auto;
533 }
534
535 .rustdoc:not(.source) .example-wrap > pre.line-numbers {
536         width: auto;
537         overflow-x: visible;
538 }
539
540 .rustdoc .example-wrap > pre {
541         margin: 0;
542 }
543
544 #search {
545         position: relative;
546 }
547
548 #results > table {
549         width: 100%;
550         table-layout: fixed;
551 }
552
553 .content > .example-wrap pre.line-numbers {
554         position: relative;
555         -webkit-user-select: none;
556         -moz-user-select: none;
557         -ms-user-select: none;
558         user-select: none;
559 }
560 .line-numbers span {
561         cursor: pointer;
562 }
563
564 .docblock-short {
565         overflow-wrap: anywhere;
566 }
567 .docblock-short p {
568         display: inline;
569 }
570
571 .docblock-short p {
572         overflow: hidden;
573         text-overflow: ellipsis;
574         margin: 0;
575 }
576 /* Wrap non-pre code blocks (`text`) but not (```text```). */
577 .docblock > :not(pre) > code,
578 .docblock-short > :not(pre) > code {
579         white-space: pre-wrap;
580 }
581
582 .top-doc .docblock h2 { font-size: 1.3rem; }
583 .top-doc .docblock h3 { font-size: 1.15rem; }
584 .top-doc .docblock h4,
585 .top-doc .docblock h5 {
586         font-size: 1.1rem;
587 }
588 .top-doc .docblock h6 {
589         font-size: 1rem;
590 }
591
592 .docblock h5 { font-size: 1rem; }
593 .docblock h6 { font-size: 0.95rem; }
594
595 .docblock {
596         margin-left: 24px;
597         position: relative;
598 }
599
600 .docblock > :not(.information) {
601         max-width: 100%;
602         overflow-x: auto;
603 }
604
605 .content .out-of-band {
606         flex-grow: 0;
607         text-align: right;
608         font-size: 1.4375rem;
609         margin: 0px;
610         padding: 0 0 0 12px;
611         font-weight: normal;
612 }
613
614 .method > .code-header, .trait-impl > .code-header, .invisible > .code-header {
615         max-width: calc(100% - 41px);
616         display: block;
617 }
618
619 .invisible {
620         width: 100%;
621         display: inline-block;
622 }
623
624 .content .in-band {
625         flex-grow: 1;
626         margin: 0px;
627         padding: 0px;
628         overflow-wrap: anywhere;
629 }
630
631 .in-band > code, .in-band > .code-header {
632         display: inline-block;
633 }
634
635 #main-content {
636         position: relative;
637 }
638 #main-content > .since {
639         top: inherit;
640         font-family: "Fira Sans", Arial, sans-serif;
641 }
642
643 .content table:not(.table-display) {
644         border-spacing: 0 5px;
645 }
646 .content td { vertical-align: top; }
647 .content td:first-child { padding-right: 20px; }
648 .content td p:first-child { margin-top: 0; }
649 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1rem; }
650 .content tr:first-child td { border-top: 0; }
651
652 .docblock table {
653         margin: .5em 0;
654         width: calc(100% - 2px);
655         overflow-x: auto;
656         display: block;
657 }
658
659 .docblock table td {
660         padding: .5em;
661         border: 1px dashed;
662 }
663
664 .docblock table th {
665         padding: .5em;
666         text-align: left;
667         border: 1px solid;
668 }
669
670 .fields + table {
671         margin-bottom: 1em;
672 }
673
674 .content .item-list {
675         list-style-type: none;
676         padding: 0;
677 }
678
679 .content .multi-column {
680         -moz-column-count: 5;
681         -moz-column-gap: 2.5em;
682         -webkit-column-count: 5;
683         -webkit-column-gap: 2.5em;
684         column-count: 5;
685         column-gap: 2.5em;
686 }
687 .content .multi-column li { width: 100%; display: inline-block; }
688
689 .content > .methods > .method {
690         font-size: 1rem;
691         position: relative;
692 }
693 /* Shift "where ..." part of method or fn definition down a line */
694 .content .method .where,
695 .content .fn .where,
696 .content .where.fmt-newline {
697         display: block;
698         font-size: 0.8rem;
699 }
700
701 .content .methods > div:not(.notable-traits):not(.method) {
702         margin-left: 40px;
703         margin-bottom: 15px;
704 }
705
706 .content .docblock > .impl-items {
707         margin-left: 20px;
708         margin-top: -34px;
709 }
710 .content .docblock >.impl-items .table-display {
711         margin: 0;
712 }
713 .content .docblock >.impl-items table td {
714         padding: 0;
715 }
716 .content .docblock > .impl-items .table-display, .impl-items table td {
717         border: none;
718 }
719
720 .content .item-info code {
721         font-size: 0.81rem;
722 }
723
724 .content .item-info {
725         position: relative;
726         margin-left: 33px;
727 }
728
729 .sub-variant > div > .item-info {
730         margin-top: initial;
731 }
732
733 .content .item-info::before {
734         content: '⬑';
735         font-size: 1.5625rem;
736         position: absolute;
737         top: -6px;
738         left: -19px;
739 }
740
741 .content .impl-items .docblock, .content .impl-items .item-info {
742         margin-bottom: .6em;
743 }
744
745 .content .impl-items > .item-info {
746         margin-left: 40px;
747 }
748
749 .methods > .item-info, .content .impl-items > .item-info {
750         margin-top: -8px;
751 }
752
753 .impl-items {
754         flex-basis: 100%;
755 }
756
757 #main-content > .item-info {
758         margin-top: 0;
759 }
760
761 nav:not(.sidebar) {
762         flex-grow: 1;
763         border-bottom: 1px solid;
764         padding-bottom: 10px;
765         margin-bottom: 25px;
766 }
767 .source nav:not(.sidebar).sub {
768         margin-left: 32px;
769 }
770 nav.main {
771         padding: 20px 0;
772         text-align: center;
773 }
774 nav.main .current {
775         border-top: 1px solid;
776         border-bottom: 1px solid;
777 }
778 nav.main .separator {
779         border: 1px solid;
780         display: inline-block;
781         height: 23px;
782         margin: 0 20px;
783 }
784 nav.sum { text-align: right; }
785 nav.sub form { display: inline; }
786
787 a {
788         text-decoration: none;
789         background: transparent;
790 }
791
792 .small-section-header {
793         display: flex;
794         justify-content: space-between;
795         position: relative;
796 }
797
798 .small-section-header:hover > .anchor {
799         display: initial;
800 }
801
802 .in-band:hover > .anchor, .impl:hover > .anchor, .method.trait-impl:hover > .anchor,
803 .type.trait-impl:hover > .anchor, .associatedconstant.trait-impl:hover > .anchor,
804 .associatedtype.trait-impl:hover > .anchor {
805         display: inline-block;
806         position: absolute;
807 }
808 .anchor {
809         display: none;
810         position: absolute;
811         left: -0.5em;
812         background: none !important;
813 }
814 .anchor.field {
815         left: -5px;
816 }
817 .small-section-header > .anchor {
818         left: -15px;
819         padding-right: 8px;
820 }
821 h2.small-section-header > .anchor {
822         padding-right: 6px;
823 }
824 .anchor::before {
825         content: '§';
826 }
827
828 .docblock a:not(.srclink):not(.test-arrow):hover,
829 .docblock-short a:not(.srclink):not(.test-arrow):hover, .item-info a {
830         text-decoration: underline;
831 }
832
833 .invisible > .srclink,
834 .method > .code-header + .srclink {
835         position: absolute;
836         top: 0;
837         right: 0;
838         font-size: 1.0625rem;
839         font-weight: normal;
840 }
841
842 .block a.current.crate { font-weight: 500; }
843
844 .item-table {
845         display: table;
846 }
847 .item-row {
848         display: table-row;
849 }
850 .item-left, .item-right {
851         display: table-cell;
852 }
853 .item-left {
854         padding-right: 1.2rem;
855 }
856
857 .search-container {
858         position: relative;
859         max-width: 960px;
860 }
861 .search-container > div {
862         display: inline-flex;
863         width: calc(100% - 63px);
864 }
865 #crate-search {
866         min-width: 115px;
867         margin-top: 5px;
868         padding: 6px;
869         padding-right: 19px;
870         flex: none;
871         border: 0;
872         border-right: 0;
873         border-radius: 4px 0 0 4px;
874         outline: none;
875         cursor: pointer;
876         border-right: 1px solid;
877         -moz-appearance: none;
878         -webkit-appearance: none;
879         /* Removes default arrow from firefox */
880         text-indent: 0.01px;
881         text-overflow: "";
882         background-repeat: no-repeat;
883         background-color: transparent;
884         background-size: 20px;
885         background-position: calc(100% - 1px) 56%;
886         background-image: /* AUTOREPLACE: */url("down-arrow.svg");
887 }
888 .search-container > .top-button {
889         position: absolute;
890         right: 0;
891         top: 10px;
892 }
893 .search-input {
894         /* Override Normalize.css: it has a rule that sets
895            -webkit-appearance: textfield for search inputs. That
896            causes rounded corners and no border on iOS Safari. */
897         -webkit-appearance: none;
898         /* Override Normalize.css: we have margins and do
899          not want to overflow - the `moz` attribute is necessary
900          until Firefox 29, too early to drop at this point */
901         -moz-box-sizing: border-box !important;
902         box-sizing: border-box !important;
903         outline: none;
904         border: none;
905         border-radius: 1px;
906         margin-top: 5px;
907         padding: 10px 16px;
908         font-size: 1.0625rem;
909         transition: border-color 300ms ease;
910         transition: border-radius 300ms ease-in-out;
911         transition: box-shadow 300ms ease-in-out;
912         width: 100%;
913 }
914
915 #crate-search + .search-input {
916         border-radius: 0 1px 1px 0;
917         width: calc(100% - 32px);
918 }
919
920 .search-input:focus {
921         border-radius: 2px;
922         border: 0;
923         outline: 0;
924 }
925
926 .search-results {
927         display: none;
928         padding-bottom: 2em;
929 }
930
931 .search-results.active {
932         display: block;
933         /* prevent overhanging tabs from moving the first result */
934         clear: both;
935 }
936
937 .search-results .desc > span {
938         white-space: nowrap;
939         text-overflow: ellipsis;
940         overflow: hidden;
941         display: block;
942 }
943
944 .search-results > a {
945         display: block;
946         width: 100%;
947         /* A little margin ensures the browser's outlining of focused links has room to display. */
948         margin-left: 2px;
949         margin-right: 2px;
950         border-bottom: 1px solid #aaa3;
951 }
952
953 .search-results > a > div {
954         display: flex;
955         flex-flow: row wrap;
956 }
957
958 .search-results .result-name, .search-results div.desc, .search-results .result-description {
959         width: 50%;
960 }
961 .search-results .result-name {
962         padding-right: 1em;
963 }
964
965 .search-results .result-name > span {
966         display: inline-block;
967         margin: 0;
968         font-weight: normal;
969 }
970
971 body.blur > :not(#help) {
972         filter: blur(8px);
973         -webkit-filter: blur(8px);
974         opacity: .7;
975 }
976
977 #help {
978         width: 100%;
979         height: 100vh;
980         position: fixed;
981         top: 0;
982         left: 0;
983         display: flex;
984         justify-content: center;
985         align-items: center;
986 }
987 #help > div {
988         flex: 0 0 auto;
989         box-shadow: 0 0 6px rgba(0,0,0,.2);
990         width: 550px;
991         height: auto;
992         border: 1px solid;
993 }
994 #help dt {
995         float: left;
996         clear: left;
997         display: block;
998         margin-right: 0.5rem;
999 }
1000 #help span.top, #help span.bottom {
1001         text-align: center;
1002         display: block;
1003         font-size: 1.125rem;
1004
1005 }
1006 #help span.top {
1007         text-align: center;
1008         display: block;
1009         margin: 10px 0;
1010         border-bottom: 1px solid;
1011         padding-bottom: 4px;
1012         margin-bottom: 6px;
1013 }
1014 #help span.bottom {
1015         clear: both;
1016         border-top: 1px solid;
1017 }
1018 #help dd { margin: 5px 35px; }
1019 #help .infos { padding-left: 0; }
1020 #help h1, #help h2 { margin-top: 0; }
1021 #help > div div {
1022         width: 50%;
1023         float: left;
1024         padding: 0 20px 20px 17px;;
1025 }
1026
1027 .item-info .stab {
1028         display: table;
1029 }
1030 .stab {
1031         padding: 3px;
1032         margin-bottom: 5px;
1033         font-size: 0.9rem;
1034         font-weight: normal;
1035 }
1036 .stab p {
1037         display: inline;
1038 }
1039
1040 .stab .emoji {
1041         font-size: 1.2rem;
1042 }
1043
1044 /* Black one-pixel outline around emoji shapes */
1045 .emoji {
1046         text-shadow:
1047                 1px 0 0 black,
1048                 -1px 0 0 black,
1049                 0  1px 0 black,
1050                 0 -1px 0 black;
1051 }
1052
1053 .module-item .stab,
1054 .import-item .stab {
1055         border-radius: 3px;
1056         display: inline-block;
1057         font-size: 0.8rem;
1058         line-height: 1.2;
1059         margin-bottom: 0;
1060         margin-left: .3em;
1061         padding: 2px;
1062         vertical-align: text-bottom;
1063 }
1064
1065 .module-item.unstable,
1066 .import-item.unstable {
1067         opacity: 0.65;
1068 }
1069
1070 .since {
1071         font-weight: normal;
1072         font-size: initial;
1073 }
1074
1075 .impl-items .since, .impl .since, .methods .since {
1076         padding-left: 12px;
1077         padding-right: 2px;
1078         position: initial;
1079 }
1080
1081 .impl-items .srclink, .impl .srclink, .methods .srclink {
1082         /* Override header settings otherwise it's too bold */
1083         font-weight: normal;
1084         font-size: 1rem;
1085 }
1086 .impl .srclink {
1087         font-size: 1.0625rem;
1088 }
1089
1090 .rightside {
1091         float: right;
1092 }
1093
1094 .has-srclink {
1095         font-size: 1rem;
1096         margin-bottom: 12px;
1097         /* Push the src link out to the right edge consistently */
1098         justify-content: space-between;
1099 }
1100
1101 .variants_table {
1102         width: 100%;
1103 }
1104
1105 .variants_table tbody tr td:first-child {
1106         width: 1%; /* make the variant name as small as possible */
1107 }
1108
1109 td.summary-column {
1110         width: 100%;
1111 }
1112
1113 .summary {
1114         padding-right: 0px;
1115 }
1116
1117 pre.rust .question-mark {
1118         font-weight: bold;
1119 }
1120
1121 a.test-arrow {
1122         display: inline-block;
1123         visibility: hidden;
1124         position: absolute;
1125         padding: 5px 10px 5px 10px;
1126         border-radius: 5px;
1127         font-size: 1.3rem;
1128         top: 5px;
1129         right: 5px;
1130         z-index: 1;
1131 }
1132 .example-wrap:hover .test-arrow {
1133         visibility: visible;
1134 }
1135 a.test-arrow:hover{
1136         text-decoration: none;
1137 }
1138 .section-header:hover a:before {
1139         position: absolute;
1140         left: -25px;
1141         padding-right: 10px; /* avoid gap that causes hover to disappear */
1142         content: '\2002\00a7\2002';
1143 }
1144
1145 .section-header:hover a {
1146         text-decoration: none;
1147 }
1148
1149 .code-attribute {
1150         font-weight: 300;
1151 }
1152
1153 .since + .srclink {
1154         padding-left: 10px;
1155 }
1156
1157 .item-spacer {
1158         width: 100%;
1159         height: 12px;
1160 }
1161
1162 .out-of-band > span.since {
1163         position: initial;
1164         font-size: 1.25rem;
1165         margin-right: 5px;
1166 }
1167
1168 h3.variant {
1169         font-weight: 600;
1170         font-size: 1.1rem;
1171         margin-bottom: 10px;
1172         border-bottom: none;
1173 }
1174
1175 .sub-variant h4 {
1176         font-size: 1rem;
1177         font-weight: 400;
1178         border-bottom: none;
1179         margin-top: 0;
1180         margin-bottom: 0;
1181 }
1182
1183 .sub-variant {
1184         margin-left: 24px;
1185         margin-bottom: 40px;
1186 }
1187
1188 .sub-variant > .sub-variant-field {
1189         margin-left: 24px;
1190 }
1191
1192 .toggle-label {
1193         display: inline-block;
1194         margin-left: 4px;
1195         margin-top: 3px;
1196 }
1197
1198 .top-doc .docblock > .section-header:first-child {
1199         margin-left: 15px;
1200 }
1201 .top-doc .docblock > .section-header:first-child:hover > a:before {
1202         left: -10px;
1203 }
1204
1205 .docblock > .section-header:first-child {
1206         margin-top: 0;
1207 }
1208
1209 :target > code, :target > .code-header {
1210         opacity: 1;
1211 }
1212
1213 :target {
1214         padding-right: 3px;
1215 }
1216
1217 .information {
1218         position: absolute;
1219         left: -25px;
1220         margin-top: 7px;
1221         z-index: 1;
1222 }
1223
1224 .tooltip {
1225         position: relative;
1226         display: inline-block;
1227         cursor: pointer;
1228 }
1229
1230 .tooltip::after {
1231         display: none;
1232         text-align: center;
1233         padding: 5px 3px 3px 3px;
1234         border-radius: 6px;
1235         margin-left: 5px;
1236         font-size: 1rem;
1237 }
1238
1239 .tooltip.ignore::after {
1240         content: "This example is not tested";
1241 }
1242 .tooltip.compile_fail::after {
1243         content: "This example deliberately fails to compile";
1244 }
1245 .tooltip.should_panic::after {
1246         content: "This example panics";
1247 }
1248 .tooltip.edition::after {
1249         content: "This code runs with edition " attr(data-edition);
1250 }
1251
1252 .tooltip::before {
1253         content: " ";
1254         position: absolute;
1255         top: 50%;
1256         left: 16px;
1257         margin-top: -5px;
1258         border-width: 5px;
1259         border-style: solid;
1260         display: none;
1261 }
1262
1263 .tooltip:hover::before, .tooltip:hover::after {
1264         display: inline;
1265 }
1266
1267 .tooltip.compile_fail, .tooltip.should_panic, .tooltip.ignore {
1268         font-weight: bold;
1269         font-size: 1.25rem;
1270 }
1271
1272 .notable-traits-tooltip {
1273         display: inline-block;
1274         cursor: pointer;
1275 }
1276
1277 .notable-traits:hover .notable-traits-tooltiptext,
1278 .notable-traits .notable-traits-tooltiptext.force-tooltip {
1279         display: inline-block;
1280 }
1281
1282 .notable-traits .notable-traits-tooltiptext {
1283         display: none;
1284         padding: 5px 3px 3px 3px;
1285         border-radius: 6px;
1286         margin-left: 5px;
1287         z-index: 10;
1288         font-size: 1rem;
1289         cursor: default;
1290         position: absolute;
1291         border: 1px solid;
1292 }
1293
1294 .notable-traits-tooltip::after {
1295         /* The margin on the tooltip does not capture hover events,
1296            this extends the area of hover enough so that mouse hover is not
1297            lost when moving the mouse to the tooltip */
1298         content: "\00a0\00a0\00a0";
1299 }
1300
1301 .notable-traits .notable, .notable-traits .docblock {
1302         margin: 0;
1303 }
1304
1305 .notable-traits .notable {
1306         margin: 0;
1307         margin-bottom: 13px;
1308         font-size: 1.1875rem;
1309         font-weight: 600;
1310 }
1311
1312 .notable-traits .docblock code.content{
1313         margin: 0;
1314         padding: 0;
1315         font-size: 1.25rem;
1316 }
1317
1318 /* Example code has the "Run" button that needs to be positioned relative to the pre */
1319 pre.rust.rust-example-rendered {
1320         position: relative;
1321 }
1322
1323 pre.rust {
1324         tab-size: 4;
1325         -moz-tab-size: 4;
1326 }
1327
1328 .search-failed {
1329         text-align: center;
1330         margin-top: 20px;
1331         display: none;
1332 }
1333
1334 .search-failed.active {
1335         display: block;
1336 }
1337
1338 .search-failed > ul {
1339         text-align: left;
1340         max-width: 570px;
1341         margin-left: auto;
1342         margin-right: auto;
1343 }
1344
1345 #titles {
1346         height: 35px;
1347 }
1348
1349 #titles > button {
1350         float: left;
1351         width: 33.3%;
1352         text-align: center;
1353         font-size: 1.125rem;
1354         cursor: pointer;
1355         border: 0;
1356         border-top: 2px solid;
1357 }
1358
1359 #titles > button:not(:last-child) {
1360         margin-right: 1px;
1361         width: calc(33.3% - 1px);
1362 }
1363
1364 #titles > button > div.count {
1365         display: inline-block;
1366         font-size: 1rem;
1367 }
1368
1369 .notable-traits {
1370         cursor: pointer;
1371         z-index: 2;
1372         margin-left: 5px;
1373 }
1374
1375 #all-types {
1376         text-align: center;
1377         border: 1px solid;
1378         margin: 0 10px;
1379         margin-bottom: 10px;
1380         display: block;
1381         border-radius: 7px;
1382 }
1383 #all-types > p {
1384         margin: 5px 0;
1385 }
1386
1387 #sidebar-toggle {
1388         position: sticky;
1389         top: 0;
1390         left: 0;
1391         cursor: pointer;
1392         font-weight: bold;
1393         font-size: 1.2rem;
1394         border-bottom: 1px solid;
1395         display: flex;
1396         height: 40px;
1397         justify-content: center;
1398         align-items: center;
1399         z-index: 10;
1400 }
1401 #source-sidebar {
1402         width: 100%;
1403         z-index: 1;
1404         overflow: auto;
1405 }
1406 #source-sidebar > .title {
1407         font-size: 1.5rem;
1408         text-align: center;
1409         border-bottom: 1px solid;
1410         margin-bottom: 6px;
1411 }
1412
1413 .theme-picker {
1414         position: absolute;
1415         left: -34px;
1416         top: 9px;
1417 }
1418
1419 .theme-picker button {
1420         outline: none;
1421 }
1422
1423 #settings-menu, #help-button {
1424         position: absolute;
1425         top: 10px;
1426 }
1427
1428 #settings-menu {
1429         right: 0;
1430         outline: none;
1431 }
1432
1433 #theme-picker, #settings-menu, #help-button, #copy-path {
1434         padding: 4px;
1435         /* Rare exception to specifying font sizes in rem. Since these are acting
1436            as icons, it's okay to specify their sizes in pixels. */
1437         font-size: 16px;
1438         width: 27px;
1439         height: 29px;
1440         border: 1px solid;
1441         border-radius: 3px;
1442         cursor: pointer;
1443 }
1444
1445 #help-button {
1446         right: 30px;
1447         font-family: "Fira Sans", Arial, sans-serif;
1448         text-align: center;
1449         /* Rare exception to specifying font sizes in rem. Since this is acting
1450            as an icon, it's okay to specify their sizes in pixels. */
1451         font-size: 16px;
1452         padding-top: 2px;
1453 }
1454
1455 #copy-path {
1456         background: initial;
1457         margin-left: 10px;
1458         padding: 0;
1459         padding-left: 2px;
1460         border: 0;
1461 }
1462
1463 #theme-choices {
1464         display: none;
1465         position: absolute;
1466         left: 0;
1467         top: 28px;
1468         border: 1px solid;
1469         border-radius: 3px;
1470         z-index: 1;
1471         cursor: pointer;
1472 }
1473
1474 #theme-choices > button {
1475         border: none;
1476         width: 100%;
1477         padding: 4px 8px;
1478         text-align: center;
1479         background: rgba(0,0,0,0);
1480 }
1481
1482 #theme-choices > button:not(:first-child) {
1483         border-top: 1px solid;
1484 }
1485
1486 kbd {
1487         display: inline-block;
1488         padding: 3px 5px;
1489         font: 15px monospace;
1490         line-height: 10px;
1491         vertical-align: middle;
1492         border: solid 1px;
1493         border-radius: 3px;
1494         box-shadow: inset 0 -1px 0;
1495         cursor: default;
1496 }
1497
1498 .hidden-by-impl-hider,
1499 .hidden-by-usual-hider {
1500         /* important because of conflicting rule for small screens */
1501         display: none !important;
1502 }
1503
1504 #implementations-list > h3 > span.in-band {
1505         width: 100%;
1506 }
1507
1508 .table-display {
1509         width: 100%;
1510         border: 0;
1511         border-collapse: collapse;
1512         border-spacing: 0;
1513         font-size: 1rem;
1514 }
1515
1516 .table-display tr td:first-child {
1517         padding-right: 0;
1518 }
1519
1520 .table-display tr td:last-child {
1521         float: right;
1522 }
1523 .table-display .out-of-band {
1524         position: relative;
1525         font-size: 1.1875rem;
1526         display: block;
1527 }
1528 #implementors-list > .impl-items .table-display .out-of-band {
1529         font-size: 1.0625rem;
1530 }
1531
1532 .table-display td:hover .anchor {
1533         display: block;
1534         top: 2px;
1535         left: -5px;
1536 }
1537
1538 #main-content > ul {
1539         padding-left: 10px;
1540 }
1541 #main-content > ul > li {
1542         list-style: none;
1543 }
1544
1545 .non-exhaustive {
1546         margin-bottom: 1em;
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.7rem;
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 /* The hideme class is used on summary tags that contain a span with
1583         placeholder text shown only when the toggle is closed. For instance,
1584         "Expand description" or "Show methods". */
1585 details.rustdoc-toggle > summary.hideme {
1586         cursor: pointer;
1587 }
1588
1589 details.rustdoc-toggle > summary {
1590         list-style: none;
1591 }
1592 details.rustdoc-toggle > summary::-webkit-details-marker,
1593 details.rustdoc-toggle > summary::marker {
1594         display: none;
1595 }
1596
1597 details.rustdoc-toggle > summary.hideme > span {
1598         margin-left: 9px;
1599 }
1600
1601 details.rustdoc-toggle > summary::before {
1602         content: "";
1603         cursor: pointer;
1604         width: 17px;
1605         height: max(17px, 1.1em);
1606         background-repeat: no-repeat;
1607         background-position: top left;
1608         display: inline-block;
1609         vertical-align: middle;
1610         opacity: .5;
1611 }
1612
1613 /* Screen readers see the text version at the end the line.
1614         Visual readers see the icon at the start of the line, but small and transparent. */
1615 details.rustdoc-toggle > summary::after {
1616         content: "Expand";
1617         overflow: hidden;
1618         width: 0;
1619         height: 0;
1620         position: absolute;
1621 }
1622
1623 details.rustdoc-toggle > summary.hideme::after {
1624         /* "hideme" toggles already have a description when they're contracted */
1625         content: "";
1626 }
1627
1628 details.rustdoc-toggle > summary:focus::before,
1629 details.rustdoc-toggle > summary:hover::before {
1630         opacity: 1;
1631 }
1632
1633 details.rustdoc-toggle.top-doc > summary,
1634 details.rustdoc-toggle.top-doc > summary::before,
1635 details.rustdoc-toggle.non-exhaustive > summary,
1636 details.rustdoc-toggle.non-exhaustive > summary::before {
1637         font-family: 'Fira Sans';
1638         font-size: 1rem;
1639 }
1640
1641 details.non-exhaustive {
1642         margin-bottom: 8px;
1643 }
1644
1645 details.rustdoc-toggle > summary.hideme::before {
1646         position: relative;
1647 }
1648
1649 details.rustdoc-toggle > summary:not(.hideme)::before {
1650         position: absolute;
1651         left: -24px;
1652         top: 3px;
1653 }
1654
1655 .impl-items > details.rustdoc-toggle > summary:not(.hideme)::before {
1656         position: absolute;
1657         left: -24px;
1658 }
1659
1660 /* When a "hideme" summary is open and the "Expand description" or "Show
1661         methods" text is hidden, we want the [-] toggle that remains to not
1662         affect the layout of the items to its right. To do that, we use
1663         absolute positioning. Note that we also set position: relative
1664         on the parent <details> to make this work properly. */
1665 details.rustdoc-toggle[open] > summary.hideme {
1666         position: absolute;
1667 }
1668
1669 details.rustdoc-toggle {
1670         position: relative;
1671 }
1672
1673 details.rustdoc-toggle[open] > summary.hideme > span {
1674         display: none;
1675 }
1676
1677 details.undocumented[open] > summary::before,
1678 details.rustdoc-toggle[open] > summary::before,
1679 details.rustdoc-toggle[open] > summary.hideme::before {
1680         background-image: /* AUTOREPLACE: */url("toggle-minus.svg");
1681 }
1682
1683 details.undocumented > summary::before, details.rustdoc-toggle > summary::before {
1684         background-image: /* AUTOREPLACE: */url("toggle-plus.svg");
1685 }
1686
1687 details.rustdoc-toggle[open] > summary::before,
1688 details.rustdoc-toggle[open] > summary.hideme::before {
1689         width: 17px;
1690         height: max(17px, 1.1em);
1691         background-repeat: no-repeat;
1692         background-position: top left;
1693         display: inline-block;
1694         content: "";
1695 }
1696
1697 details.rustdoc-toggle[open] > summary::after,
1698 details.rustdoc-toggle[open] > summary.hideme::after {
1699         content: "Collapse";
1700 }
1701
1702 /* Media Queries */
1703
1704 @media (min-width: 701px) {
1705         /* In case there is no documentation before a code block, we need to add some margin at the top
1706         to prevent an overlay between the "collapse toggle" and the information tooltip.
1707         However, it's not needed with smaller screen width because the doc/code block is always put
1708         "one line" below. */
1709         .docblock > .information:first-child > .tooltip {
1710                 margin-top: 16px;
1711         }
1712
1713         /* When we expand the sidebar on the source code page, we hide the logo on the left of the
1714         search bar to have more space. */
1715         .sidebar.expanded + main .width-limiter .sub-logo-container.rust-logo {
1716                 display: none;
1717         }
1718
1719         /* It doesn't render well on mobile because of the layout, so better only have the transition
1720         on desktop. */
1721         .rustdoc.source .sidebar {
1722                 transition: width .5s;
1723         }
1724
1725         .source .sidebar.expanded {
1726                 width: 300px;
1727         }
1728 }
1729
1730 @media (max-width: 700px) {
1731         body {
1732                 padding-top: 0px;
1733         }
1734
1735         main {
1736                 padding-left: 15px;
1737                 padding-top: 0px;
1738         }
1739
1740         .rustdoc {
1741                 flex-direction: column;
1742         }
1743
1744         .rustdoc:not(.source) > .sidebar {
1745                 width: 100%;
1746                 height: 45px;
1747                 min-height: 40px;
1748                 max-height: 45px;
1749                 margin: 0;
1750                 padding: 0 15px;
1751                 position: static;
1752                 z-index: 11;
1753                 overflow-y: hidden;
1754         }
1755
1756         .rustdoc.source > .sidebar {
1757                 position: fixed;
1758                 top: 0;
1759                 left: 0;
1760                 margin: 0;
1761                 z-index: 11;
1762                 width: 0;
1763         }
1764
1765         .sidebar.mobile {
1766                 position: sticky !important;
1767                 top: 0;
1768                 left: 0;
1769                 width: 100%;
1770                 margin-left: 0;
1771                 background-color: rgba(0,0,0,0);
1772         }
1773
1774         .sidebar > .location {
1775                 float: right;
1776                 margin: 0px;
1777                 margin-top: 2px;
1778                 padding: 3px 10px 1px 10px;
1779                 min-height: 39px;
1780                 background: inherit;
1781                 text-align: left;
1782                 font-size: 1.5rem;
1783         }
1784
1785         .sidebar .location:empty {
1786                 padding: 0;
1787         }
1788
1789         .rustdoc:not(.source) .sidebar .logo-container {
1790                 width: 35px;
1791                 height: 35px;
1792                 margin-top: 5px;
1793                 margin-bottom: 5px;
1794                 float: left;
1795                 margin-left: 50px;
1796         }
1797
1798         .sidebar .logo-container > img {
1799                 max-width: 35px;
1800                 max-height: 35px;
1801         }
1802
1803         .sidebar-menu {
1804                 position: fixed;
1805                 z-index: 10;
1806                 font-size: 2rem;
1807                 cursor: pointer;
1808                 width: 45px;
1809                 left: 0;
1810                 top: 0;
1811                 text-align: center;
1812                 display: block;
1813                 border-bottom: 1px solid;
1814                 border-right: 1px solid;
1815                 height: 45px;
1816         }
1817
1818         .rustdoc.source > .sidebar > .sidebar-menu {
1819                 display: none;
1820         }
1821
1822         /* We do NOT hide this element so that alternative device readers still have this information
1823            available. */
1824         .sidebar-elems {
1825                 position: fixed;
1826                 z-index: 1;
1827                 top: 45px;
1828                 bottom: 0;
1829                 width: 246px;
1830                 /* We move the sidebar to the left by its own width so it doesn't appear. */
1831                 left: -246px;
1832                 overflow-y: auto;
1833                 border-right: 1px solid;
1834         }
1835
1836         .sidebar > .block.version {
1837                 overflow: hidden;
1838                 border-bottom: none;
1839                 margin-bottom: 0;
1840                 height: 100%;
1841                 padding-left: 12px;
1842         }
1843         .sidebar > .block.version > div.narrow-helper {
1844                 float: left;
1845                 width: 1px;
1846                 height: 100%;
1847         }
1848         .sidebar > .block.version > p {
1849                 /* hide Version text if too narrow */
1850                 margin: 0;
1851                 min-width: 55px;
1852                 /* vertically center */
1853                 display: flex;
1854                 align-items: center;
1855                 height: 100%;
1856         }
1857
1858         nav.sub {
1859                 width: calc(100% - 32px);
1860                 margin-left: 32px;
1861                 margin-bottom: 10px;
1862         }
1863
1864         .source nav:not(.sidebar).sub {
1865                 margin-left: 32px;
1866         }
1867
1868         .content {
1869                 margin-left: 0px;
1870         }
1871
1872         .source .content {
1873                 margin-top: 10px;
1874         }
1875
1876         #search {
1877                 margin-left: 0;
1878                 padding: 0;
1879         }
1880
1881         .anchor {
1882                 display: none !important;
1883         }
1884
1885         .theme-picker {
1886                 z-index: 1;
1887         }
1888
1889         .notable-traits {
1890                 position: absolute;
1891                 left: -22px;
1892                 top: 24px;
1893         }
1894
1895         #titles > button > div.count {
1896                 float: left;
1897                 width: 100%;
1898         }
1899
1900         #titles {
1901                 height: 50px;
1902         }
1903
1904         .show-it, .sidebar-elems:focus-within {
1905                 z-index:  2;
1906                 left: 0;
1907         }
1908
1909         .show-it > .block.items {
1910                 margin: 8px 0;
1911         }
1912
1913         .show-it > .block.items > ul {
1914                 margin: 0;
1915         }
1916
1917         .show-it > .block.items > ul > li {
1918                 text-align: center;
1919                 margin: 2px 0;
1920         }
1921
1922         .show-it > .block.items > ul > li > a {
1923                 font-size: 1.3125rem;
1924         }
1925
1926         /* Because of ios, we need to actually have a full height sidebar title so the
1927          * actual sidebar can show up. But then we need to make it transparent so we don't
1928          * hide content. The filler just allows to create the background for the sidebar
1929          * title. But because of the absolute position, I had to lower the z-index.
1930          */
1931         #sidebar-filler {
1932                 position: fixed;
1933                 left: 45px;
1934                 width: calc(100% - 45px);
1935                 top: 0;
1936                 height: 45px;
1937                 z-index: -1;
1938                 border-bottom: 1px solid;
1939         }
1940
1941         #main-content > details.rustdoc-toggle > summary::before,
1942         #main-content > div > details.rustdoc-toggle > summary::before {
1943                 left: -11px;
1944         }
1945
1946         #all-types {
1947                 margin: 10px;
1948         }
1949
1950         .sidebar.expanded #sidebar-toggle {
1951                 font-size: 1.5rem;
1952         }
1953
1954         .sidebar:not(.expanded) #sidebar-toggle {
1955                 position: fixed;
1956                 left: 1px;
1957                 top: 100px;
1958                 width: 30px;
1959                 font-size: 1.5rem;
1960                 text-align: center;
1961                 padding: 0;
1962                 z-index: 10;
1963                 border-top-right-radius: 3px;
1964                 border-bottom-right-radius: 3px;
1965                 cursor: pointer;
1966                 font-weight: bold;
1967                 border: 1px solid;
1968                 border-left: 0;
1969         }
1970
1971         #source-sidebar {
1972                 z-index: 11;
1973         }
1974
1975         #main-content > .line-numbers {
1976                 margin-top: 0;
1977         }
1978
1979         .notable-traits .notable-traits-tooltiptext {
1980                 left: 0;
1981                 top: 100%;
1982         }
1983
1984         /* We don't display the help button on mobile devices. */
1985         #help-button {
1986                 display: none;
1987         }
1988
1989         /* Display an alternating layout on tablets and phones */
1990         .item-table {
1991                 display: block;
1992         }
1993         .item-row {
1994                 display: flex;
1995                 flex-flow: column wrap;
1996         }
1997         .item-left, .item-right {
1998                 width: 100%;
1999         }
2000
2001         .search-container > div {
2002                 width: calc(100% - 32px);
2003         }
2004
2005         /* Display an alternating layout on tablets and phones */
2006         .search-results > a {
2007                 border-bottom: 1px solid #aaa9;
2008                 padding: 5px 0px;
2009         }
2010         .search-results .result-name, .search-results div.desc, .search-results .result-description {
2011                 width: 100%;
2012         }
2013         .search-results div.desc, .search-results .result-description, .item-right {
2014                 padding-left: 2em;
2015         }
2016
2017         .source .sidebar.expanded {
2018                 max-width: 100vw;
2019                 width: 100vw;
2020         }
2021
2022         /* Position of the "[-]" element. */
2023         details.rustdoc-toggle:not(.top-doc) > summary {
2024                 margin-left: 10px;
2025         }
2026         .impl-items > details.rustdoc-toggle > summary:not(.hideme)::before,
2027         #main-content > details.rustdoc-toggle:not(.top-doc) > summary::before,
2028         #main-content > div > details.rustdoc-toggle > summary::before {
2029                 left: -11px;
2030         }
2031 }
2032
2033 @media print {
2034         nav.sub, .content .out-of-band {
2035                 display: none;
2036         }
2037 }
2038
2039 @media (max-width: 464px) {
2040         #titles, #titles > button {
2041                 height: 73px;
2042         }
2043
2044         #main-content > table:not(.table-display) td {
2045                 word-break: break-word;
2046                 width: 50%;
2047         }
2048
2049         .search-container > div {
2050                 display: block;
2051                 width: calc(100% - 37px);
2052         }
2053
2054         #crate-search {
2055                 width: 100%;
2056                 border-radius: 4px;
2057                 border: 0;
2058         }
2059
2060         #crate-search + .search-input {
2061                 width: calc(100% + 71px);
2062                 margin-left: -36px;
2063         }
2064
2065         #theme-picker, #settings-menu {
2066                 padding: 5px;
2067                 width: 31px;
2068                 height: 31px;
2069         }
2070
2071         #theme-picker {
2072                 margin-top: -2px;
2073         }
2074
2075         #settings-menu {
2076                 top: 7px;
2077         }
2078
2079         .docblock {
2080                 margin-left: 12px;
2081         }
2082
2083         .docblock code {
2084                 overflow-wrap: anywhere;
2085         }
2086
2087         .sub-container {
2088                 flex-direction: column;
2089         }
2090
2091         .sub-logo-container {
2092                 align-self: center;
2093         }
2094
2095         .source .sub-logo-container > img {
2096                 height: 35px;
2097                 width: 35px;
2098         }
2099
2100         .sidebar:not(.expanded) #sidebar-toggle {
2101                 top: 10px;
2102         }
2103 }
2104
2105
2106 /* Begin: styles for --scrape-examples feature */
2107
2108 .scraped-example-title {
2109         font-family: 'Fira Sans';
2110 }
2111
2112 .scraped-example:not(.expanded) .code-wrapper pre.line-numbers {
2113         overflow: hidden;
2114         max-height: 240px;
2115 }
2116
2117 .scraped-example:not(.expanded) .code-wrapper .example-wrap pre.rust {
2118         overflow-y: hidden;
2119         max-height: 240px;
2120         padding-bottom: 0;
2121 }
2122
2123 .scraped-example .code-wrapper .prev {
2124         position: absolute;
2125         top: 0.25em;
2126         right: 2.25em;
2127         z-index: 100;
2128         cursor: pointer;
2129 }
2130
2131 .scraped-example .code-wrapper .next {
2132         position: absolute;
2133         top: 0.25em;
2134         right: 1.25em;
2135         z-index: 100;
2136         cursor: pointer;
2137 }
2138
2139 .scraped-example .code-wrapper .expand {
2140         position: absolute;
2141         top: 0.25em;
2142         right: 0.25em;
2143         z-index: 100;
2144         cursor: pointer;
2145 }
2146
2147 .scraped-example .code-wrapper {
2148         position: relative;
2149         display: flex;
2150         flex-direction: row;
2151         flex-wrap: wrap;
2152         width: 100%;
2153 }
2154
2155 .scraped-example:not(.expanded) .code-wrapper:before {
2156         content: " ";
2157         width: 100%;
2158         height: 5px;
2159         position: absolute;
2160         z-index: 100;
2161         top: 0;
2162         background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
2163 }
2164
2165 .scraped-example:not(.expanded) .code-wrapper:after {
2166         content: " ";
2167         width: 100%;
2168         height: 5px;
2169         position: absolute;
2170         z-index: 100;
2171         bottom: 0;
2172         background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
2173 }
2174
2175 .scraped-example:not(.expanded) .code-wrapper {
2176         overflow: hidden;
2177         max-height: 240px;
2178 }
2179
2180 .scraped-example .code-wrapper .line-numbers {
2181         margin: 0;
2182         padding: 14px 0;
2183 }
2184
2185 .scraped-example .code-wrapper .line-numbers span {
2186         padding: 0 14px;
2187 }
2188
2189 .scraped-example .code-wrapper .example-wrap {
2190         flex: 1;
2191         overflow-x: auto;
2192         overflow-y: hidden;
2193         margin-bottom: 0;
2194 }
2195
2196 .scraped-example .code-wrapper .example-wrap pre.rust {
2197         overflow-x: inherit;
2198         width: inherit;
2199         overflow-y: hidden;
2200 }
2201
2202 .scraped-example .example-wrap .rust span.highlight {
2203         background: #fcffd6;
2204 }
2205
2206 .scraped-example .example-wrap .rust span.highlight.focus {
2207         background: #f6fdb0;
2208 }
2209
2210 .more-examples-toggle {
2211         margin-top: 10px;
2212 }
2213
2214 .more-examples-toggle summary {
2215         color: #999;
2216         font-family: 'Fira Sans';
2217 }
2218
2219 .more-scraped-examples {
2220         margin-left: 25px;
2221         display: flex;
2222         flex-direction: row;
2223         width: calc(100% - 25px);
2224 }
2225
2226 .more-scraped-examples-inner {
2227         /* 20px is width of toggle-line + toggle-line-inner */
2228         width: calc(100% - 20px);
2229 }
2230
2231 .toggle-line {
2232         align-self: stretch;
2233         margin-right: 10px;
2234         margin-top: 5px;
2235         padding: 0 4px;
2236         cursor: pointer;
2237 }
2238
2239 .toggle-line:hover .toggle-line-inner {
2240         background: #aaa;
2241 }
2242
2243 .toggle-line-inner {
2244         min-width: 2px;
2245         background: #ddd;
2246         height: 100%;
2247 }
2248
2249 .more-scraped-examples .scraped-example {
2250         margin-bottom: 20px;
2251 }
2252
2253 .more-scraped-examples .scraped-example:last-child {
2254         margin-bottom: 0;
2255 }
2256
2257 .example-links a {
2258         margin-top: 20px;
2259         font-family: 'Fira Sans';
2260 }
2261
2262 .example-links ul {
2263         margin-bottom: 0;
2264 }
2265
2266 /* End: styles for --scrape-examples feature */