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