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