]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/rustdoc.css
Fixes issue #43205: ICE in Rvalue::Len evaluation.
[rust.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 h1, h2, h3, h4, .sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
115         font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
116 }
117
118 ol, ul {
119         padding-left: 25px;
120 }
121 ul ul, ol ul, ul ol, ol ol {
122         margin-bottom: 0;
123 }
124
125 p {
126         margin: 0 0 .6em 0;
127 }
128
129 code, pre {
130         font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
131         white-space: pre-wrap;
132 }
133 .docblock code, .docblock-short code {
134         border-radius: 3px;
135         padding: 0 0.2em;
136 }
137 .docblock pre code, .docblock-short pre code {
138         padding: 0;
139 }
140 pre {
141         padding: 14px;
142 }
143
144 .source .content pre {
145         padding: 20px;
146 }
147
148 img {
149         max-width: 100%;
150 }
151
152 .source .content {
153         margin-top: 50px;
154         max-width: none;
155         overflow: visible;
156         margin-left: 0px;
157         min-width: 70em;
158 }
159
160 nav.sub {
161         font-size: 16px;
162         text-transform: uppercase;
163 }
164
165 .sidebar {
166         width: 200px;
167         position: absolute;
168         left: 0;
169         top: 0;
170         min-height: 100%;
171 }
172
173 .sidebar .current {
174         margin-right: -20px;
175 }
176
177 .content, nav { max-width: 960px; }
178
179 /* Everything else */
180
181 .js-only, .hidden { display: none !important; }
182
183 .sidebar {
184         padding: 10px;
185 }
186 .sidebar img {
187         margin: 20px auto;
188         display: block;
189 }
190
191 .sidebar .location {
192         border: 1px solid;
193         font-size: 17px;
194         margin: 30px 0 20px 0;
195         text-align: center;
196         word-wrap: break-word;
197 }
198
199 .location:empty {
200         border: none;
201 }
202
203 .location a:first-child { font-weight: 500; }
204
205 .block {
206         padding: 0 10px;
207         margin-bottom: 14px;
208 }
209 .block h2, .block h3 {
210         margin-top: 0;
211         margin-bottom: 8px;
212         text-align: center;
213 }
214 .block ul, .block li {
215         margin: 0;
216         padding: 0;
217         list-style: none;
218 }
219
220 .block a {
221         display: block;
222         text-overflow: ellipsis;
223         overflow: hidden;
224         line-height: 15px;
225         padding: 7px 5px;
226         font-size: 14px;
227         font-weight: 300;
228         transition: border 500ms ease-out;
229 }
230
231 .content {
232         padding: 15px 0;
233 }
234
235 .source .content pre.rust {
236         white-space: pre;
237         overflow: auto;
238         padding-left: 0;
239 }
240 #search {
241         margin-left: 230px;
242 }
243 .content pre.line-numbers {
244         float: left;
245         border: none;
246         position: relative;
247
248         -webkit-user-select: none;
249         -moz-user-select: none;
250         -ms-user-select: none;
251         user-select: none;
252 }
253 .line-numbers span { cursor: pointer; }
254
255 .docblock-short p {
256         display: inline;
257 }
258
259 .docblock-short.nowrap {
260         display: block;
261         overflow: hidden;
262         white-space: nowrap;
263         text-overflow: ellipsis;
264 }
265
266 .docblock-short p {
267         overflow: hidden;
268         text-overflow: ellipsis;
269         margin: 0;
270 }
271 .docblock-short code { white-space: nowrap; }
272
273 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
274         border-bottom: 1px solid;
275 }
276
277 #main > .docblock h1 { font-size: 1.3em; }
278 #main > .docblock h2 { font-size: 1.15em; }
279 #main > .docblock h3, #main > .docblock h4, #main > .docblock h5 { font-size: 1em; }
280
281 .docblock h1 { font-size: 1em; }
282 .docblock h2 { font-size: 0.95em; }
283 .docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }
284
285 .docblock {
286         margin-left: 24px;
287 }
288
289 .content .out-of-band {
290         font-size: 23px;
291         margin: 0px;
292         padding: 0px;
293         text-align: right;
294         display: inline-block;
295         font-weight: normal;
296         position: absolute;
297         right: 0;
298 }
299
300 h3.impl > .out-of-band {
301         font-size: 21px;
302 }
303
304 h4.method > .out-of-band {
305         font-size: 19px;
306 }
307
308 h4 > code, h3 > code, .invisible > code {
309         position: inherit;
310 }
311
312 .in-band, code {
313         z-index: 5;
314 }
315
316 .invisible {
317         background: rgba(0, 0, 0, 0);
318         width: 100%;
319         display: inline-block;
320 }
321
322 .content .in-band {
323         margin: 0px;
324         padding: 0px;
325         display: inline-block;
326 }
327
328 #main { position: relative; }
329 #main > .since {
330         top: inherit;
331         font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
332 }
333
334 .content table {
335         border-spacing: 0 5px;
336         border-collapse: separate;
337 }
338 .content td { vertical-align: top; }
339 .content td:first-child { padding-right: 20px; }
340 .content td p:first-child { margin-top: 0; }
341 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
342
343 .docblock table {
344         border: 1px solid;
345         margin: .5em 0;
346         border-collapse: collapse;
347         width: 100%;
348 }
349
350 .docblock table td {
351         padding: .5em;
352         border-top: 1px dashed;
353         border-bottom: 1px dashed;
354 }
355
356 .docblock table th {
357         padding: .5em;
358         text-align: left;
359         border-top: 1px solid;
360         border-bottom: 1px solid;
361 }
362
363 .fields + table {
364         margin-bottom: 1em;
365 }
366
367 .content .item-list {
368         list-style-type: none;
369         padding: 0;
370 }
371
372 .content .item-list li { margin-bottom: 3px; }
373
374 .content .multi-column {
375         -moz-column-count: 5;
376         -moz-column-gap: 2.5em;
377         -webkit-column-count: 5;
378         -webkit-column-gap: 2.5em;
379         column-count: 5;
380         column-gap: 2.5em;
381 }
382 .content .multi-column li { width: 100%; display: inline-block; }
383
384 .content .method {
385         font-size: 1em;
386         position: relative;
387 }
388 /* Shift "where ..." part of method or fn definition down a line */
389 .content .method .where,
390 .content .fn .where,
391 .content .where.fmt-newline {
392         display: block;
393         color: #4E4C4C;
394         font-size: 0.8em;
395 }
396
397 .content .methods > div { margin-left: 40px; }
398
399 .content .impl-items .docblock, .content .impl-items .stability {
400         margin-left: 40px;
401 }
402 .content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
403         margin-left: 20px;
404 }
405
406 .content .stability code {
407         font-size: 90%;
408 }
409
410 nav {
411         border-bottom: 1px solid;
412         padding-bottom: 10px;
413         margin-bottom: 10px;
414 }
415 nav.main {
416         padding: 20px 0;
417         text-align: center;
418 }
419 nav.main .current {
420         border-top: 1px solid;
421         border-bottom: 1px solid;
422 }
423 nav.main .separator {
424         border: 1px solid;
425         display: inline-block;
426         height: 23px;
427         margin: 0 20px;
428 }
429 nav.sum { text-align: right; }
430 nav.sub form { display: inline; }
431
432 nav.sub, .content {
433         margin-left: 230px;
434 }
435
436 a {
437         text-decoration: none;
438         background: transparent;
439 }
440
441 .small-section-header:hover > .anchor {
442         display: initial;
443 }
444 .anchor {
445         display: none;
446 }
447 .anchor:after {
448         content: '\2002\00a7\2002';
449 }
450
451 .docblock a:hover, .docblock-short a:hover, .stability a {
452         text-decoration: underline;
453 }
454
455 .block a.current.crate { font-weight: 500; }
456
457 .search-input {
458         width: 100%;
459         /* Override Normalize.css: we have margins and do
460          not want to overflow - the `moz` attribute is necessary
461          until Firefox 29, too early to drop at this point */
462         -moz-box-sizing: border-box !important;
463         box-sizing: border-box !important;
464         outline: none;
465         border: none;
466         border-radius: 1px;
467         margin-top: 5px;
468         padding: 10px 16px;
469         font-size: 17px;
470         transition: border-color 300ms ease;
471         transition: border-radius 300ms ease-in-out;
472         transition: box-shadow 300ms ease-in-out;
473 }
474
475 .search-input:focus {
476         border-color: #66afe9;
477         border-radius: 2px;
478         border: 0;
479         outline: 0;
480         box-shadow: 0 0 8px #078dd8;
481 }
482
483 .search-results .desc {
484         white-space: nowrap;
485         text-overflow: ellipsis;
486         overflow: hidden;
487         display: block;
488 }
489
490 .search-results a {
491         display: block;
492 }
493
494 .content .search-results td:first-child { padding-right: 0; }
495 .content .search-results td:first-child a { padding-right: 10px; }
496
497 tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; color: black;
498 }
499
500 body.blur > :not(#help) {
501         filter: blur(8px);
502         -webkit-filter: blur(8px);
503         opacity: .7;
504 }
505
506 #help {
507         width: 100%;
508         height: 100vh;
509         position: fixed;
510         top: 0;
511         left: 0;
512         display: flex;
513         justify-content: center;
514         align-items: center;
515 }
516 #help > div {
517         flex: 0 0 auto;
518         box-shadow: 0 0 6px rgba(0,0,0,.2);
519         width: 550px;
520         height: 330px;
521         border: 1px solid;
522 }
523 #help dt {
524         float: left;
525         border-radius: 4px;
526         border: 1px solid;
527         width: 23px;
528         text-align: center;
529         clear: left;
530         display: block;
531         margin-top: -1px;
532 }
533 #help dd { margin: 5px 33px; }
534 #help .infos { padding-left: 0; }
535 #help h1, #help h2 { margin-top: 0; }
536 #help > div div {
537         width: 50%;
538         float: left;
539         padding: 20px;
540 }
541
542 .stab {
543         display: table;
544         border-width: 1px;
545         border-style: solid;
546         padding: 3px;
547         margin-bottom: 5px;
548         font-size: 90%;
549 }
550 .stab p {
551         display: inline;
552 }
553
554 .stab summary {
555         display: list-item;
556 }
557
558 .stab .microscope {
559         font-size: 1.5em;
560 }
561
562 .module-item .stab {
563         display: inline;
564         border-width: 0;
565         padding: 0;
566         margin: 0;
567         background: inherit !important;
568 }
569
570 .module-item.unstable {
571         opacity: 0.65;
572 }
573
574 .since {
575         font-weight: normal;
576         font-size: initial;
577         position: absolute;
578         right: 0;
579         top: 0;
580 }
581
582 .variants_table {
583         width: 100%;
584 }
585
586 .variants_table tbody tr td:first-child {
587         width: 1%; /* make the variant name as small as possible */
588 }
589
590 td.summary-column {
591         width: 100%;
592 }
593
594 .summary {
595         padding-right: 0px;
596 }
597
598 pre.rust .question-mark {
599         font-weight: bold;
600 }
601
602 pre.rust { position: relative; }
603 a.test-arrow {
604         display: inline-block;
605         position: absolute;
606         padding: 5px 10px 5px 10px;
607         border-radius: 5px;
608         font-size: 130%;
609         top: 5px;
610         right: 5px;
611 }
612 a.test-arrow:hover{
613         text-decoration: none;
614 }
615
616 .section-header:hover a:after {
617         content: '\2002\00a7\2002';
618 }
619
620 .section-header:hover a {
621         text-decoration: none;
622 }
623
624 .section-header a {
625         color: inherit;
626 }
627
628 .collapse-toggle {
629         font-weight: 300;
630         position: absolute;
631         left: -23px;
632         color: #999;
633         top: 0;
634 }
635
636 h3 > .collapse-toggle, h4 > .collapse-toggle {
637         font-size: 0.8em;
638         top: 5px;
639 }
640
641 .toggle-wrapper > .collapse-toggle {
642         left: -24px;
643         margin-top: 0px;
644 }
645
646 .toggle-wrapper {
647         position: relative;
648 }
649
650 .toggle-wrapper.collapsed {
651         height: 1em;
652         transition: height .2s;
653 }
654
655 .collapse-toggle > .inner {
656         display: inline-block;
657         width: 1.2ch;
658         text-align: center;
659 }
660
661 .ghost {
662         display: none;
663 }
664
665 .ghost + .since {
666         position: initial;
667         display: table-cell;
668 }
669
670 .since + .srclink {
671         display: table-cell;
672         padding-left: 10px;
673 }
674
675 .item-spacer {
676         width: 100%;
677         height: 12px;
678 }
679
680 span.since {
681         position: initial;
682         font-size: 20px;
683         margin-right: 5px;
684 }
685
686 .toggle-wrapper > .collapse-toggle {
687         left: 0;
688 }
689
690 .variant + .toggle-wrapper + .docblock > p {
691         margin-top: 5px;
692 }
693
694 .variant + .toggle-wrapper > a {
695         margin-top: 5px;
696 }
697
698 .sub-variant, .sub-variant > h3 {
699         margin-top: 0 !important;
700 }
701
702 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
703         margin-left: 30px;
704         margin-bottom: 20px;
705         margin-top: 5px;
706 }
707
708 .enum > .collapsed, .struct > .collapsed {
709         margin-bottom: 25px;
710 }
711
712 #main > .variant, #main > .structfield {
713         display: block;
714 }
715
716 .attributes {
717         display: block;
718         margin: 0px 0px 0px 30px !important;
719 }
720 .toggle-attributes.collapsed {
721         margin-bottom: 5px;
722 }
723
724 :target > code {
725         opacity: 1;
726 }
727
728 /* Media Queries */
729
730 @media (max-width: 700px) {
731         body {
732                 padding-top: 0px;
733         }
734
735         .sidebar {
736                 height: 40px;
737                 min-height: 40px;
738                 width: 100%;
739                 margin: 0px;
740                 padding: 0px;
741                 position: static;
742         }
743
744         .sidebar .location {
745                 float: right;
746                 margin: 0px;
747                 padding: 3px 10px 1px 10px;
748                 min-height: 39px;
749                 background: inherit;
750                 text-align: left;
751                 font-size: 24px;
752         }
753
754         .sidebar .location:empty {
755                 padding: 0;
756         }
757
758         .sidebar img {
759                 width: 35px;
760                 margin-top: 5px;
761                 margin-bottom: 0px;
762                 float: left;
763         }
764
765         nav.sub {
766                 margin: 0 auto;
767         }
768
769         .sidebar .block {
770                 display: none;
771         }
772
773         .content {
774                 margin-left: 0px;
775         }
776
777         .content .in-band {
778                 width: 100%;
779         }
780
781         .content .out-of-band {
782                 display: none;
783         }
784
785         .toggle-wrapper > .collapse-toggle {
786                 left: 0px;
787         }
788
789         .toggle-wrapper {
790                 height: 1.5em;
791         }
792 }
793
794 @media print {
795         nav.sub, .content .out-of-band, .collapse-toggle {
796                 display: none;
797         }
798 }