]> git.proxmox.com Git - rustc.git/blob - src/librustdoc/html/static/rustdoc.css
Imported Upstream version 1.9.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 src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
54 }
55 @font-face {
56 font-family: 'Source Code Pro';
57 font-style: normal;
58 font-weight: 600;
59 src: local('Source Code Pro Semibold'), url("SourceCodePro-Semibold.woff") format('woff');
60 }
61
62 @import "normalize.css";
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) {
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 }
101 h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
102 border-bottom: 1px solid;
103 }
104 h3.impl, h3.method, h4.method, h3.type, h4.type {
105 font-weight: 600;
106 margin-top: 10px;
107 margin-bottom: 10px;
108 }
109 h3.impl, h3.method, h3.type {
110 margin-top: 15px;
111 }
112 h1, h2, h3, h4, .sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
113 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
114 }
115
116 ol, ul {
117 padding-left: 25px;
118 }
119 ul ul, ol ul, ul ol, ol ol {
120 margin-bottom: 0;
121 }
122
123 p {
124 margin: 0 0 .6em 0;
125 }
126
127 code, pre {
128 font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
129 white-space: pre-wrap;
130 }
131 .docblock code {
132 border-radius: 3px;
133 padding: 0 0.2em;
134 }
135 .docblock pre code {
136 padding: 0;
137 }
138 pre {
139 padding: 14px;
140 }
141
142 .source pre {
143 padding: 20px;
144 }
145
146 img {
147 max-width: 100%;
148 }
149
150 .content.source {
151 margin-top: 50px;
152 max-width: none;
153 overflow: visible;
154 margin-left: 0px;
155 min-width: 70em;
156 }
157
158 nav.sub {
159 font-size: 16px;
160 text-transform: uppercase;
161 }
162
163 .sidebar {
164 width: 200px;
165 position: absolute;
166 left: 0;
167 top: 0;
168 min-height: 100%;
169 }
170
171 .content, nav { max-width: 960px; }
172
173 /* Everything else */
174
175 .js-only, .hidden { display: none !important; }
176
177 .sidebar {
178 padding: 10px;
179 }
180 .sidebar img {
181 margin: 20px auto;
182 display: block;
183 }
184
185 .sidebar .location {
186 font-size: 17px;
187 margin: 30px 0 20px 0;
188 text-align: center;
189 }
190
191 .location a:first-child { font-weight: 500; }
192
193 .block {
194 padding: 0 10px;
195 margin-bottom: 14px;
196 }
197 .block h2, .block h3 {
198 margin-top: 0;
199 margin-bottom: 8px;
200 text-align: center;
201 }
202 .block ul, .block li {
203 margin: 0;
204 padding: 0;
205 list-style: none;
206 }
207
208 .block a {
209 display: block;
210 text-overflow: ellipsis;
211 overflow: hidden;
212 line-height: 15px;
213 padding: 7px 5px;
214 font-size: 14px;
215 font-weight: 300;
216 transition: border 500ms ease-out;
217 }
218
219 .content {
220 padding: 15px 0;
221 }
222
223 .content.source pre.rust {
224 white-space: pre;
225 overflow: auto;
226 padding-left: 0;
227 }
228 .content pre.line-numbers {
229 float: left;
230 border: none;
231 position: relative;
232
233 -webkit-user-select: none;
234 -moz-user-select: none;
235 -ms-user-select: none;
236 user-select: none;
237 }
238 .line-numbers span { cursor: pointer; }
239
240 .docblock.short p {
241 display: inline;
242 }
243
244 .docblock.short.nowrap {
245 display: block;
246 overflow: hidden;
247 white-space: nowrap;
248 text-overflow: ellipsis;
249 }
250
251 .docblock.short p {
252 overflow: hidden;
253 text-overflow: ellipsis;
254 margin: 0;
255 }
256 .docblock.short code { white-space: nowrap; }
257
258 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
259 border-bottom: 1px solid;
260 }
261
262 .docblock h1 { font-size: 1.3em; }
263 .docblock h2 { font-size: 1.15em; }
264 .docblock h3, .docblock h4, .docblock h5 { font-size: 1em; }
265
266 .content .out-of-band {
267 font-size: 23px;
268 width: 40%;
269 margin: 0px;
270 padding: 0px;
271 text-align: right;
272 display: inline-block;
273 }
274
275 .content .in-band {
276 width: 60%;
277 margin: 0px;
278 padding: 0px;
279 display: inline-block;
280 }
281
282 .content table {
283 border-spacing: 0 5px;
284 border-collapse: separate;
285 }
286 .content td { vertical-align: top; }
287 .content td:first-child { padding-right: 20px; }
288 .content td p:first-child { margin-top: 0; }
289 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
290
291 .docblock table {
292 border: 1px solid;
293 margin: .5em 0;
294 border-collapse: collapse;
295 width: 100%;
296 }
297
298 .docblock table td {
299 padding: .5em;
300 border-top: 1px dashed;
301 border-bottom: 1px dashed;
302 }
303
304 .docblock table th {
305 padding: .5em;
306 text-align: left;
307 border-top: 1px solid;
308 border-bottom: 1px solid;
309 }
310
311 .content .item-list {
312 list-style-type: none;
313 padding: 0;
314 }
315
316 .content .item-list li { margin-bottom: 3px; }
317
318 .content .multi-column {
319 -moz-column-count: 5;
320 -moz-column-gap: 2.5em;
321 -webkit-column-count: 5;
322 -webkit-column-gap: 2.5em;
323 column-count: 5;
324 column-gap: 2.5em;
325 }
326 .content .multi-column li { width: 100%; display: inline-block; }
327
328 .content .method {
329 font-size: 1em;
330 position: relative;
331 }
332 /* Shift "where ..." part of method or fn definition down a line */
333 .content .method .where, .content .fn .where { display: block; }
334 /* Bit of whitespace to indent it */
335 .content .method .where::before, .content .fn .where::before { content: ' '; }
336
337 .content .methods > div { margin-left: 40px; }
338
339 .content .impl-items .docblock, .content .impl-items .stability {
340 margin-left: 40px;
341 }
342 .content .impl-items .method, .content .impl-items > .type {
343 margin-left: 20px;
344 }
345
346 .content .stability code {
347 font-size: 90%;
348 }
349
350 nav {
351 border-bottom: 1px solid;
352 padding-bottom: 10px;
353 margin-bottom: 10px;
354 }
355 nav.main {
356 padding: 20px 0;
357 text-align: center;
358 }
359 nav.main .current {
360 border-top: 1px solid;
361 border-bottom: 1px solid;
362 }
363 nav.main .separator {
364 border: 1px solid;
365 display: inline-block;
366 height: 23px;
367 margin: 0 20px;
368 }
369 nav.sum { text-align: right; }
370 nav.sub form { display: inline; }
371
372 nav.sub, .content {
373 margin-left: 230px;
374 }
375
376 a {
377 text-decoration: none;
378 background: transparent;
379 }
380
381 .docblock a:hover, .stability a {
382 text-decoration: underline;
383 }
384
385 .content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
386 .content span.struct, .content a.struct, .block a.current.struct { color: #df3600; }
387 .content a.type { color: #e57300; }
388 .content a.macro { color: #068000; }
389 .block a.current.crate { font-weight: 500; }
390
391 .search-input {
392 width: 100%;
393 /* Override Normalize.css: we have margins and do
394 not want to overflow - the `moz` attribute is necessary
395 until Firefox 29, too early to drop at this point */
396 -moz-box-sizing: border-box !important;
397 box-sizing: border-box !important;
398 outline: none;
399 border: none;
400 border-radius: 1px;
401 margin-top: 5px;
402 padding: 10px 16px;
403 font-size: 17px;
404 transition: border-color 300ms ease;
405 transition: border-radius 300ms ease-in-out;
406 transition: box-shadow 300ms ease-in-out;
407 }
408
409 .search-input:focus {
410 border-color: #66afe9;
411 border-radius: 2px;
412 border: 0;
413 outline: 0;
414 box-shadow: 0 0 8px #078dd8;
415 }
416
417 .search-results .desc {
418 white-space: nowrap;
419 text-overflow: ellipsis;
420 overflow: hidden;
421 display: block;
422 }
423
424 .search-results a {
425 display: block;
426 }
427
428 .content .search-results td:first-child { padding-right: 0; }
429 .content .search-results td:first-child a { padding-right: 10px; }
430
431 tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; }
432
433 body.blur > :not(#help) {
434 filter: blur(8px);
435 -webkit-filter: blur(8px);
436 opacity: .7;
437 }
438
439 #help {
440 width: 100%;
441 height: 100vh;
442 position: fixed;
443 top: 0;
444 left: 0;
445 display: flex;
446 justify-content: center;
447 align-items: center;
448 }
449 #help > div {
450 flex: 0 0 auto;
451 background: #e9e9e9;
452 box-shadow: 0 0 6px rgba(0,0,0,.2);
453 width: 550px;
454 height: 300px;
455 border: 1px solid #bfbfbf;
456 }
457 #help dt {
458 float: left;
459 border-radius: 4px;
460 border: 1px solid #bfbfbf;
461 background: #fff;
462 width: 23px;
463 text-align: center;
464 clear: left;
465 display: block;
466 margin-top: -1px;
467 }
468 #help dd { margin: 5px 33px; }
469 #help .infos { padding-left: 0; }
470 #help h1, #help h2 { margin-top: 0; }
471 #help > div div {
472 width: 50%;
473 float: left;
474 padding: 20px;
475 }
476
477 em.stab {
478 display: inline-block;
479 border-width: 1px;
480 border-style: solid;
481 padding: 3px;
482 margin-bottom: 5px;
483 font-size: 90%;
484 font-style: normal;
485 }
486 em.stab p {
487 display: inline;
488 }
489
490 .module-item .stab {
491 border-width: 0;
492 padding: 0;
493 margin: 0;
494 background: inherit !important;
495 }
496
497 .module-item.unstable {
498 opacity: 0.65;
499 }
500
501 span.since {
502 float: right;
503 font-weight: normal;
504 font-size: initial;
505 color: grey;
506 }
507
508 .variants_table {
509 width: 100%;
510 }
511
512 .variants_table tbody tr td:first-child {
513 width: 1%; /* make the variant name as small as possible */
514 }
515
516 td.summary-column {
517 width: 100%;
518 }
519
520 .summary {
521 padding-right: 0px;
522 }
523
524 .line-numbers :target { background-color: transparent; }
525
526 /* Code highlighting */
527 pre.rust .kw { color: #8959A8; }
528 pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
529 pre.rust .number, pre.rust .string { color: #718C00; }
530 pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
531 pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
532 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
533 pre.rust .lifetime { color: #B76514; }
534
535 .rusttest { display: none; }
536 pre.rust { position: relative; }
537 a.test-arrow {
538 display: inline-block;
539 position: absolute;
540 background-color: #4e8bca;
541 padding: 5px 10px 5px 10px;
542 border-radius: 5px;
543 font-size: 130%;
544 top: 5px;
545 right: 5px;
546 }
547
548 .methods .section-header {
549 /* Override parent class attributes. */
550 border-bottom: none !important;
551 font-size: 1.1em !important;
552 margin: 0 0 -5px;
553 padding: 0;
554 }
555
556 .section-header:hover a:after {
557 content: '\2002\00a7\2002';
558 }
559
560 .section-header:hover a {
561 text-decoration: none;
562 }
563
564 .section-header a {
565 color: inherit;
566 }
567
568 .collapse-toggle {
569 font-weight: 300;
570 position: absolute;
571 left: -23px;
572 color: #999;
573 top: 0;
574 }
575
576 .toggle-wrapper > .collapse-toggle {
577 left: -24px;
578 margin-top: 0px;
579 }
580
581 .toggle-wrapper {
582 position: relative;
583 }
584
585 .toggle-wrapper.collapsed {
586 height: 1em;
587 transition: height .2s;
588 }
589
590 .collapse-toggle > .inner {
591 display: inline-block;
592 width: 1.2ch;
593 text-align: center;
594 }
595
596 .toggle-label {
597 color: #999;
598 }
599
600
601
602 /* Media Queries */
603
604 @media (max-width: 700px) {
605 body {
606 padding-top: 0px;
607 }
608
609 .sidebar {
610 height: 40px;
611 min-height: 40px;
612 width: 100%;
613 margin: 0px;
614 padding: 0px;
615 position: static;
616 }
617
618 .sidebar .location {
619 float: right;
620 margin: 0px;
621 padding: 3px 10px 1px 10px;
622 min-height: 39px;
623 background: inherit;
624 text-align: left;
625 font-size: 24px;
626 }
627
628 .sidebar .location:empty {
629 padding: 0;
630 }
631
632 .sidebar img {
633 width: 35px;
634 margin-top: 5px;
635 margin-bottom: 0px;
636 float: left;
637 }
638
639 nav.sub {
640 margin: 0 auto;
641 }
642
643 .sidebar .block {
644 display: none;
645 }
646
647 .content {
648 margin-left: 0px;
649 }
650
651 .content .in-band {
652 width: 100%;
653 }
654
655 .content .out-of-band {
656 display: none;
657 }
658
659 .toggle-wrapper > .collapse-toggle {
660 left: 0px;
661 }
662
663 .toggle-wrapper {
664 height: 1.5em;
665 }
666 }
667
668 @media print {
669 nav.sub, .content .out-of-band, .collapse-toggle {
670 display: none;
671 }
672 }