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