]> git.proxmox.com Git - rustc.git/blob - src/librustdoc/html/static/rustdoc.css
New upstream version 1.23.0+dfsg1
[rustc.git] / src / librustdoc / html / static / rustdoc.css
1 /**
2 * Copyright 2013 The Rust Project Developers. See the COPYRIGHT
3 * file at the top-level directory of this distribution and at
4 * http://rust-lang.org/COPYRIGHT.
5 *
6 * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7 * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8 * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9 * option. This file may not be copied, modified, or distributed
10 * except according to those terms.
11 */
12
13 /* See FiraSans-LICENSE.txt for the Fira Sans license. */
14 @font-face {
15 font-family: 'Fira Sans';
16 font-style: normal;
17 font-weight: 400;
18 src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
19 }
20 @font-face {
21 font-family: 'Fira Sans';
22 font-style: normal;
23 font-weight: 500;
24 src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
25 }
26
27 /* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license and
28 * Heuristica-LICENSE.txt for the Heuristica license. */
29 @font-face {
30 font-family: 'Source Serif Pro';
31 font-style: normal;
32 font-weight: 400;
33 src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
34 }
35 @font-face {
36 font-family: 'Source Serif Pro';
37 font-style: italic;
38 font-weight: 400;
39 src: url("Heuristica-Italic.woff") format('woff');
40 }
41 @font-face {
42 font-family: 'Source Serif Pro';
43 font-style: normal;
44 font-weight: 700;
45 src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
46 }
47
48 /* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
49 @font-face {
50 font-family: 'Source Code Pro';
51 font-style: normal;
52 font-weight: 400;
53 /* Avoid using locally installed font because bad versions are in circulation:
54 * see https://github.com/rust-lang/rust/issues/24355 */
55 src: url("SourceCodePro-Regular.woff") format('woff');
56 }
57 @font-face {
58 font-family: 'Source Code Pro';
59 font-style: normal;
60 font-weight: 600;
61 src: url("SourceCodePro-Semibold.woff") format('woff');
62 }
63
64 * {
65 -webkit-box-sizing: border-box;
66 -moz-box-sizing: border-box;
67 box-sizing: border-box;
68 }
69
70 /* General structure and fonts */
71
72 body {
73 font: 16px/1.4 "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
74 margin: 0;
75 position: relative;
76 padding: 10px 15px 20px 15px;
77
78 -webkit-font-feature-settings: "kern", "liga";
79 -moz-font-feature-settings: "kern", "liga";
80 font-feature-settings: "kern", "liga";
81 }
82
83 h1 {
84 font-size: 1.5em;
85 }
86 h2 {
87 font-size: 1.4em;
88 }
89 h3 {
90 font-size: 1.3em;
91 }
92 h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
93 font-weight: 500;
94 margin: 20px 0 15px 0;
95 padding-bottom: 6px;
96 }
97 h1.fqn {
98 border-bottom: 1px dashed;
99 margin-top: 0;
100 position: relative;
101 }
102 h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
103 border-bottom: 1px solid;
104 }
105 h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
106 font-weight: 600;
107 margin-top: 10px;
108 margin-bottom: 10px;
109 position: relative;
110 }
111 h3.impl, h3.method, h3.type {
112 margin-top: 15px;
113 }
114
115 h1, h2, h3, h4,
116 .sidebar, a.source, .search-input, .content table :not(code)>a,
117 .collapse-toggle, ul.item-list > li > .out-of-band {
118 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
119 }
120
121 ol, ul {
122 padding-left: 25px;
123 }
124 ul ul, ol ul, ul ol, ol ol {
125 margin-bottom: 0;
126 }
127
128 p {
129 margin: 0 0 .6em 0;
130 }
131
132 summary {
133 outline: none;
134 }
135
136 code, pre {
137 font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
138 white-space: pre-wrap;
139 }
140 .docblock code, .docblock-short code {
141 border-radius: 3px;
142 padding: 0 0.2em;
143 }
144 .docblock pre code, .docblock-short pre code {
145 padding: 0;
146 }
147 pre {
148 padding: 14px;
149 }
150
151 .source .content pre {
152 padding: 20px;
153 }
154
155 img {
156 max-width: 100%;
157 }
158
159 .source .content {
160 margin-top: 50px;
161 max-width: none;
162 overflow: visible;
163 margin-left: 0px;
164 min-width: 70em;
165 }
166
167 nav.sub {
168 font-size: 16px;
169 text-transform: uppercase;
170 }
171
172 .sidebar {
173 width: 200px;
174 position: fixed;
175 left: 0;
176 top: 0;
177 height: 100vh;
178 overflow: auto;
179 }
180
181 .sidebar .current {
182 margin-right: -20px;
183 }
184
185 .content, nav { max-width: 960px; }
186
187 /* Everything else */
188
189 .js-only, .hidden { display: none !important; }
190
191 .sidebar img {
192 margin: 20px auto;
193 display: block;
194 margin-top: 10px;
195 }
196
197 .sidebar .location {
198 border: 1px solid;
199 font-size: 17px;
200 margin: 30px 10px 20px 10px;
201 text-align: center;
202 word-wrap: break-word;
203 }
204
205 .sidebar .version {
206 font-size: 15px;
207 text-align: center;
208 border-bottom: #DDDDDD 1px solid;
209 overflow-wrap: break-word;
210 word-wrap: break-word; /* deprecated */
211 word-break: break-word; /* Chrome, non-standard */
212 }
213
214 .location:empty {
215 border: none;
216 }
217
218 .location a:first-child { font-weight: 500; }
219
220 .block {
221 padding: 0;
222 margin-bottom: 14px;
223 }
224 .block h2, .block h3 {
225 margin-top: 0;
226 margin-bottom: 8px;
227 text-align: center;
228 }
229 .block ul, .block li {
230 margin: 0 10px;
231 padding: 0;
232 list-style: none;
233 }
234
235 .block a {
236 display: block;
237 text-overflow: ellipsis;
238 overflow: hidden;
239 line-height: 15px;
240 padding: 7px 5px;
241 font-size: 14px;
242 font-weight: 300;
243 transition: border 500ms ease-out;
244 }
245
246 .sidebar-title {
247 border-top: 1px solid #777;
248 border-bottom: 1px solid #777;
249 text-align: center;
250 font-size: 17px;
251 margin-bottom: 5px;
252 }
253
254 .sidebar-links {
255 margin-bottom: 15px;
256 }
257
258 .sidebar-links > a {
259 padding-left: 10px;
260 width: 100%;
261 }
262
263 .content {
264 padding: 15px 0;
265 }
266
267 .source .content pre.rust {
268 white-space: pre;
269 overflow: auto;
270 padding-left: 0;
271 }
272 #search {
273 margin-left: 230px;
274 }
275 .content pre.line-numbers {
276 float: left;
277 border: none;
278 position: relative;
279
280 -webkit-user-select: none;
281 -moz-user-select: none;
282 -ms-user-select: none;
283 user-select: none;
284 }
285 .line-numbers span { cursor: pointer; }
286
287 .docblock-short p {
288 display: inline;
289 }
290
291 .docblock-short.nowrap {
292 display: block;
293 overflow: hidden;
294 white-space: nowrap;
295 text-overflow: ellipsis;
296 }
297
298 .docblock-short p {
299 overflow: hidden;
300 text-overflow: ellipsis;
301 margin: 0;
302 }
303 .docblock-short code { white-space: nowrap; }
304
305 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
306 border-bottom: 1px solid;
307 }
308
309 #main > .docblock h1 { font-size: 1.3em; }
310 #main > .docblock h2 { font-size: 1.15em; }
311 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
312
313 .docblock h1 { font-size: 1em; }
314 .docblock h2 { font-size: 0.95em; }
315 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
316
317 .docblock {
318 margin-left: 24px;
319 position: relative;
320 }
321
322 .content .out-of-band {
323 font-size: 23px;
324 margin: 0px;
325 padding: 0px;
326 text-align: right;
327 display: inline-block;
328 font-weight: normal;
329 position: absolute;
330 right: 0;
331 }
332
333 h3.impl > .out-of-band {
334 font-size: 21px;
335 }
336
337 h4.method > .out-of-band {
338 font-size: 19px;
339 }
340
341 ul.item-list > li > .out-of-band {
342 font-size: 19px;
343 }
344
345 h4 > code, h3 > code, .invisible > code {
346 position: inherit;
347 }
348
349 .in-band, code {
350 z-index: 5;
351 }
352
353 .invisible {
354 background: rgba(0, 0, 0, 0);
355 width: 100%;
356 display: inline-block;
357 }
358
359 .content .in-band {
360 margin: 0px;
361 padding: 0px;
362 display: inline-block;
363 }
364
365 .in-band > code {
366 display: inline-block;
367 }
368
369 #main { position: relative; }
370 #main > .since {
371 top: inherit;
372 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
373 }
374
375 .content table {
376 border-spacing: 0 5px;
377 border-collapse: separate;
378 }
379 .content td { vertical-align: top; }
380 .content td:first-child { padding-right: 20px; }
381 .content td p:first-child { margin-top: 0; }
382 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
383
384 .docblock table {
385 border: 1px solid;
386 margin: .5em 0;
387 border-collapse: collapse;
388 width: 100%;
389 }
390
391 .docblock table td {
392 padding: .5em;
393 border-top: 1px dashed;
394 border-bottom: 1px dashed;
395 }
396
397 .docblock table th {
398 padding: .5em;
399 text-align: left;
400 border-top: 1px solid;
401 border-bottom: 1px solid;
402 }
403
404 .fields + table {
405 margin-bottom: 1em;
406 }
407
408 .content .item-list {
409 list-style-type: none;
410 padding: 0;
411 }
412
413 .content .item-list li { margin-bottom: 1em; }
414
415 .content .multi-column {
416 -moz-column-count: 5;
417 -moz-column-gap: 2.5em;
418 -webkit-column-count: 5;
419 -webkit-column-gap: 2.5em;
420 column-count: 5;
421 column-gap: 2.5em;
422 }
423 .content .multi-column li { width: 100%; display: inline-block; }
424
425 .content .method {
426 font-size: 1em;
427 position: relative;
428 }
429 /* Shift "where ..." part of method or fn definition down a line */
430 .content .method .where,
431 .content .fn .where,
432 .content .where.fmt-newline {
433 display: block;
434 color: #4E4C4C;
435 font-size: 0.8em;
436 }
437
438 .content .methods > div { margin-left: 40px; }
439
440 .content .impl-items .docblock, .content .impl-items .stability {
441 margin-left: 40px;
442 }
443 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
444 margin-left: 20px;
445 }
446
447 .content .stability code {
448 font-size: 90%;
449 }
450
451 nav {
452 border-bottom: 1px solid;
453 padding-bottom: 10px;
454 margin-bottom: 10px;
455 }
456 nav.main {
457 padding: 20px 0;
458 text-align: center;
459 }
460 nav.main .current {
461 border-top: 1px solid;
462 border-bottom: 1px solid;
463 }
464 nav.main .separator {
465 border: 1px solid;
466 display: inline-block;
467 height: 23px;
468 margin: 0 20px;
469 }
470 nav.sum { text-align: right; }
471 nav.sub form { display: inline; }
472
473 nav.sub, .content {
474 margin-left: 230px;
475 }
476
477 a {
478 text-decoration: none;
479 background: transparent;
480 }
481
482 .small-section-header:hover > .anchor {
483 display: initial;
484 }
485
486 .in-band:hover > .anchor {
487 display: inline-block;
488 position: absolute;
489 }
490 .anchor {
491 display: none;
492 position: absolute;
493 left: -25px;
494 }
495 .anchor.field {
496 left: -20px;
497 }
498 .anchor:before {
499 content: '\2002\00a7\2002';
500 }
501
502 .docblock a:hover, .docblock-short a:hover, .stability a {
503 text-decoration: underline;
504 }
505
506 .block a.current.crate { font-weight: 500; }
507
508 .search-input {
509 width: 100%;
510 /* Override Normalize.css: we have margins and do
511 not want to overflow - the `moz` attribute is necessary
512 until Firefox 29, too early to drop at this point */
513 -moz-box-sizing: border-box !important;
514 box-sizing: border-box !important;
515 outline: none;
516 border: none;
517 border-radius: 1px;
518 margin-top: 5px;
519 padding: 10px 16px;
520 font-size: 17px;
521 transition: border-color 300ms ease;
522 transition: border-radius 300ms ease-in-out;
523 transition: box-shadow 300ms ease-in-out;
524 }
525
526 .search-input:focus {
527 border-color: #66afe9;
528 border-radius: 2px;
529 border: 0;
530 outline: 0;
531 box-shadow: 0 0 8px #078dd8;
532 }
533
534 .search-results .desc {
535 white-space: nowrap;
536 text-overflow: ellipsis;
537 overflow: hidden;
538 display: block;
539 }
540
541 .search-results a {
542 display: block;
543 }
544
545 .content .search-results td:first-child { padding-right: 0; }
546 .content .search-results td:first-child a { padding-right: 10px; }
547
548 tr.result span.primitive::after {
549 content: ' (primitive type)'; font-style: italic; color: black;
550 }
551
552 body.blur > :not(#help) {
553 filter: blur(8px);
554 -webkit-filter: blur(8px);
555 opacity: .7;
556 }
557
558 #help {
559 width: 100%;
560 height: 100vh;
561 position: fixed;
562 top: 0;
563 left: 0;
564 display: flex;
565 justify-content: center;
566 align-items: center;
567 }
568 #help > div {
569 flex: 0 0 auto;
570 box-shadow: 0 0 6px rgba(0,0,0,.2);
571 width: 550px;
572 height: 354px;
573 border: 1px solid;
574 }
575 #help dt {
576 float: left;
577 border-radius: 4px;
578 border: 1px solid;
579 width: 23px;
580 text-align: center;
581 clear: left;
582 display: block;
583 margin-top: -1px;
584 }
585 #help dd { margin: 5px 35px; }
586 #help .infos { padding-left: 0; }
587 #help h1, #help h2 { margin-top: 0; }
588 #help > div div {
589 width: 50%;
590 float: left;
591 padding: 20px;
592 padding-left: 17px;
593 }
594
595 .stab {
596 display: table;
597 border-width: 1px;
598 border-style: solid;
599 padding: 3px;
600 margin-bottom: 5px;
601 font-size: 90%;
602 }
603 .stab p {
604 display: inline;
605 }
606
607 .stab summary {
608 display: list-item;
609 }
610
611 .stab .microscope {
612 font-size: 1.5em;
613 }
614
615 .module-item .stab {
616 display: inline;
617 border-width: 0;
618 padding: 0;
619 margin: 0;
620 background: inherit !important;
621 }
622
623 .module-item.unstable {
624 opacity: 0.65;
625 }
626
627 .since {
628 font-weight: normal;
629 font-size: initial;
630 position: absolute;
631 right: 0;
632 top: 0;
633 }
634
635 .variants_table {
636 width: 100%;
637 }
638
639 .variants_table tbody tr td:first-child {
640 width: 1%; /* make the variant name as small as possible */
641 }
642
643 td.summary-column {
644 width: 100%;
645 }
646
647 .summary {
648 padding-right: 0px;
649 }
650
651 pre.rust .question-mark {
652 font-weight: bold;
653 }
654
655 a.test-arrow {
656 display: inline-block;
657 position: absolute;
658 padding: 5px 10px 5px 10px;
659 border-radius: 5px;
660 font-size: 130%;
661 top: 5px;
662 right: 5px;
663 }
664 a.test-arrow:hover{
665 text-decoration: none;
666 }
667
668 .section-header:hover a:before {
669 position: absolute;
670 left: -25px;
671 content: '\2002\00a7\2002';
672 }
673
674 .section-header:hover a {
675 text-decoration: none;
676 }
677
678 .section-header a {
679 color: inherit;
680 }
681
682 .collapse-toggle {
683 font-weight: 300;
684 position: absolute;
685 left: -23px;
686 color: #999;
687 top: 0;
688 }
689
690 h3 > .collapse-toggle, h4 > .collapse-toggle {
691 font-size: 0.8em;
692 top: 5px;
693 }
694
695 .toggle-wrapper > .collapse-toggle {
696 left: -24px;
697 margin-top: 0px;
698 }
699
700 .toggle-wrapper {
701 position: relative;
702 margin-top: 5px;
703 }
704
705 .toggle-wrapper.collapsed {
706 height: 25px;
707 transition: height .2s;
708 margin-bottom: .6em;
709 }
710
711 .collapse-toggle > .inner {
712 display: inline-block;
713 width: 1.2ch;
714 text-align: center;
715 }
716
717 .ghost {
718 display: none;
719 }
720
721 .ghost + .since {
722 position: initial;
723 display: table-cell;
724 }
725
726 .since + .srclink {
727 display: table-cell;
728 padding-left: 10px;
729 }
730
731 .item-spacer {
732 width: 100%;
733 height: 12px;
734 }
735
736 span.since {
737 position: initial;
738 font-size: 20px;
739 margin-right: 5px;
740 }
741
742 .toggle-wrapper > .collapse-toggle {
743 left: 0;
744 }
745
746 .variant + .toggle-wrapper + .docblock > p {
747 margin-top: 5px;
748 }
749
750 .sub-variant, .sub-variant > h3 {
751 margin-top: 0 !important;
752 }
753
754 .toggle-label {
755 display: inline-block;
756 margin-left: 4px;
757 margin-top: 3px;
758 }
759
760 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
761 margin-left: 30px;
762 margin-bottom: 20px;
763 margin-top: 5px;
764 }
765
766 .docblock > .section-header:first-child {
767 margin-left: 15px;
768 margin-top: 0;
769 }
770
771 .docblock > .section-header:first-child:hover > a:before {
772 left: -10px;
773 }
774
775 .enum > .collapsed, .struct > .collapsed {
776 margin-bottom: 25px;
777 }
778
779 #main > .variant, #main > .structfield {
780 display: block;
781 }
782
783 .attributes {
784 display: block;
785 margin: 0px 0px 0px 30px !important;
786 }
787 .toggle-attributes.collapsed {
788 margin-bottom: 5px;
789 }
790
791 :target > code {
792 opacity: 1;
793 }
794
795 /* Media Queries */
796
797 @media (max-width: 700px) {
798 body {
799 padding-top: 0px;
800 }
801
802 .sidebar {
803 height: 45px;
804 min-height: 40px;
805 width: calc(100% + 30px);
806 margin: 0;
807 margin-left: -15px;
808 padding: 0 15px;
809 position: static;
810 }
811
812 .sidebar .location {
813 float: right;
814 margin: 0px;
815 margin-top: 2px;
816 padding: 3px 10px 1px 10px;
817 min-height: 39px;
818 background: inherit;
819 text-align: left;
820 font-size: 24px;
821 }
822
823 .sidebar .location:empty {
824 padding: 0;
825 }
826
827 .sidebar img {
828 width: 35px;
829 margin-top: 5px;
830 margin-bottom: 5px;
831 float: left;
832 }
833
834 nav.sub {
835 margin: 0 auto;
836 }
837
838 .sidebar .block {
839 display: none;
840 }
841
842 .content {
843 margin-left: 0px;
844 }
845
846 .content .in-band {
847 width: 100%;
848 }
849
850 .content h4 > .out-of-band {
851 position: inherit;
852 }
853
854 .toggle-wrapper > .collapse-toggle {
855 left: 0px;
856 }
857
858 .toggle-wrapper {
859 height: 1.5em;
860 }
861
862 #search {
863 margin-left: 0;
864 }
865
866 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
867 display: flex;
868 }
869 }
870
871 @media print {
872 nav.sub, .content .out-of-band, .collapse-toggle {
873 display: none;
874 }
875 }
876
877 .information {
878 position: absolute;
879 left: -20px;
880 margin-top: 7px;
881 z-index: 1;
882 }
883
884 .tooltip {
885 position: relative;
886 display: inline-block;
887 cursor: pointer;
888 }
889
890 .tooltip .tooltiptext {
891 width: 120px;
892 display: none;
893 background-color: black;
894 color: #fff;
895 text-align: center;
896 padding: 5px 3px;
897 border-radius: 6px;
898 margin-left: 5px;
899 top: -5px;
900 left: 105%;
901 z-index: 1;
902 }
903
904 .tooltip:hover .tooltiptext {
905 display: inline;
906 }
907
908 .tooltip .tooltiptext::after {
909 content: " ";
910 position: absolute;
911 top: 50%;
912 left: 11px;
913 margin-top: -5px;
914 border-width: 5px;
915 border-style: solid;
916 border-color: transparent black transparent transparent;
917 }
918
919 pre.rust {
920 position: relative;
921 }
922
923 .search-failed {
924 text-align: center;
925 margin-top: 20px;
926 }
927
928 #titles {
929 height: 35px;
930 }
931
932 #titles > div {
933 float: left;
934 width: 33.3%;
935 text-align: center;
936 border-bottom: 1px solid #ccc;
937 font-size: 18px;
938 cursor: pointer;
939 }
940
941 #titles > div.selected {
942 border-bottom: 3px solid #0078ee;
943 }
944
945 #titles > div:hover {
946 border-bottom: 3px solid #0089ff;
947 }
948
949 #titles > div > div.count {
950 display: inline-block;
951 color: #888;
952 font-size: 16px;
953 }