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