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