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