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