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