]> git.proxmox.com Git - rustc.git/blame - src/librustdoc/html/static/rustdoc.css
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / librustdoc / html / static / rustdoc.css
CommitLineData
1a4d82fc
JJ
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 */
b039eaaf
SL
12
13/* See FiraSans-LICENSE.txt for the Fira Sans license. */
1a4d82fc
JJ
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}
b039eaaf
SL
26
27/* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license and
28 * Heuristica-LICENSE.txt for the Heuristica license. */
1a4d82fc
JJ
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}
b039eaaf
SL
47
48/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
1a4d82fc
JJ
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
72body {
85aaf69f 73 font: 16px/1.4 "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
1a4d82fc
JJ
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
83h1 {
84 font-size: 1.5em;
85}
86h2 {
87 font-size: 1.4em;
88}
89h3 {
90 font-size: 1.3em;
91}
c34b1796 92h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
1a4d82fc
JJ
93 font-weight: 500;
94 margin: 20px 0 15px 0;
95 padding-bottom: 6px;
96}
97h1.fqn {
92a42be0 98 border-bottom: 1px dashed;
1a4d82fc
JJ
99 margin-top: 0;
100}
c34b1796 101h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
92a42be0 102 border-bottom: 1px solid;
1a4d82fc
JJ
103}
104h3.impl, h3.method, h4.method, h3.type, h4.type {
105 font-weight: 600;
106 margin-top: 10px;
107 margin-bottom: 10px;
108}
109h3.impl, h3.method, h3.type {
110 margin-top: 15px;
111}
e9174d1e 112h1, h2, h3, h4, .sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
1a4d82fc
JJ
113 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
114}
115
116ol, ul {
117 padding-left: 25px;
118}
119ul ul, ol ul, ul ol, ol ol {
120 margin-bottom: 0;
121}
122
123p {
124 margin: 0 0 .6em 0;
125}
126
127code, pre {
128 font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
129 white-space: pre-wrap;
130}
131.docblock code {
1a4d82fc
JJ
132 border-radius: 3px;
133 padding: 0 0.2em;
134}
c1a9b12d
SL
135.docblock pre code {
136 padding: 0;
137}
1a4d82fc 138pre {
1a4d82fc
JJ
139 padding: 14px;
140}
141
142.source pre {
143 padding: 20px;
144}
145
9cc50fc6
SL
146img {
147 max-width: 100%;
148}
149
1a4d82fc
JJ
150.content.source {
151 margin-top: 50px;
152 max-width: none;
153 overflow: visible;
154 margin-left: 0px;
155 min-width: 70em;
156}
157
158nav.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
c1a9b12d 175.js-only, .hidden { display: none !important; }
1a4d82fc
JJ
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;
1a4d82fc 188 text-align: center;
1a4d82fc
JJ
189}
190
191.location a:first-child { font-weight: 500; }
192
193.block {
194 padding: 0 10px;
195 margin-bottom: 14px;
196}
e9174d1e 197.block h2, .block h3 {
1a4d82fc
JJ
198 margin-top: 0;
199 margin-bottom: 8px;
200 text-align: center;
201}
e9174d1e
SL
202.block ul, .block li {
203 margin: 0;
204 padding: 0;
205 list-style: none;
206}
1a4d82fc
JJ
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
1a4d82fc
JJ
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}
92a42be0 238.line-numbers span { cursor: pointer; }
1a4d82fc 239
d9579d0f
AL
240.docblock.short p {
241 display: inline;
242}
243
1a4d82fc
JJ
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 {
92a42be0 259 border-bottom: 1px solid;
1a4d82fc
JJ
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
85aaf69f 291.docblock table {
92a42be0 292 border: 1px solid;
85aaf69f
SL
293 margin: .5em 0;
294 border-collapse: collapse;
295 width: 100%;
296}
297
298.docblock table td {
299 padding: .5em;
92a42be0
SL
300 border-top: 1px dashed;
301 border-bottom: 1px dashed;
85aaf69f
SL
302}
303
304.docblock table th {
305 padding: .5em;
306 text-align: left;
92a42be0
SL
307 border-top: 1px solid;
308 border-bottom: 1px solid;
85aaf69f
SL
309}
310
1a4d82fc
JJ
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}
62682a34
SL
332/* Shift "where ..." part of method or fn definition down a line */
333.content .method .where, .content .fn .where { display: block; }
1a4d82fc 334/* Bit of whitespace to indent it */
62682a34 335.content .method .where::before, .content .fn .where::before { content: ' '; }
1a4d82fc 336
d9579d0f 337.content .methods > div { margin-left: 40px; }
1a4d82fc 338
d9579d0f
AL
339.content .impl-items .docblock, .content .impl-items .stability {
340 margin-left: 40px;
341}
62682a34 342.content .impl-items .method, .content .impl-items > .type {
d9579d0f
AL
343 margin-left: 20px;
344}
1a4d82fc 345
e9174d1e 346.content .stability code {
92a42be0 347 font-size: 90%;
e9174d1e
SL
348}
349
1a4d82fc 350nav {
92a42be0 351 border-bottom: 1px solid;
1a4d82fc
JJ
352 padding-bottom: 10px;
353 margin-bottom: 10px;
354}
355nav.main {
356 padding: 20px 0;
357 text-align: center;
358}
359nav.main .current {
92a42be0
SL
360 border-top: 1px solid;
361 border-bottom: 1px solid;
1a4d82fc
JJ
362}
363nav.main .separator {
92a42be0 364 border: 1px solid;
1a4d82fc
JJ
365 display: inline-block;
366 height: 23px;
367 margin: 0 20px;
368}
369nav.sum { text-align: right; }
370nav.sub form { display: inline; }
371
e9174d1e 372nav.sub, .content {
1a4d82fc
JJ
373 margin-left: 230px;
374}
375
376a {
377 text-decoration: none;
1a4d82fc
JJ
378 background: transparent;
379}
c34b1796 380
e9174d1e 381.docblock a:hover, .stability a {
c34b1796
AL
382 text-decoration: underline;
383}
1a4d82fc 384
1a4d82fc 385.content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
7453a54e 386.content span.struct, .content a.struct, .block a.current.struct { color: #df3600; }
92a42be0
SL
387.content a.type { color: #e57300; }
388.content a.macro { color: #068000; }
e9174d1e 389.block a.current.crate { font-weight: 500; }
1a4d82fc
JJ
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;
1a4d82fc
JJ
401 margin-top: 5px;
402 padding: 10px 16px;
403 font-size: 17px;
1a4d82fc
JJ
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
62682a34
SL
431tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; }
432
c1a9b12d
SL
433body.blur > :not(#help) {
434 filter: blur(8px);
435 -webkit-filter: blur(8px);
436 opacity: .7;
437}
438
1a4d82fc 439#help {
c1a9b12d
SL
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;
1a4d82fc 451 background: #e9e9e9;
1a4d82fc 452 box-shadow: 0 0 6px rgba(0,0,0,.2);
1a4d82fc
JJ
453 width: 550px;
454 height: 300px;
455 border: 1px solid #bfbfbf;
456}
1a4d82fc
JJ
457#help dt {
458 float: left;
c1a9b12d 459 border-radius: 4px;
1a4d82fc
JJ
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; }
e9174d1e 470#help h1, #help h2 { margin-top: 0; }
c1a9b12d 471#help > div div {
1a4d82fc
JJ
472 width: 50%;
473 float: left;
474 padding: 20px;
475}
476
d9579d0f
AL
477em.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;
1a4d82fc 485}
d9579d0f
AL
486em.stab p {
487 display: inline;
1a4d82fc
JJ
488}
489
d9579d0f
AL
490.module-item .stab {
491 border-width: 0;
492 padding: 0;
493 margin: 0;
494 background: inherit !important;
1a4d82fc
JJ
495}
496
d9579d0f
AL
497.module-item.unstable {
498 opacity: 0.65;
499}
1a4d82fc 500
7453a54e
SL
501span.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
c34b1796
AL
516td.summary-column {
517 width: 100%;
518}
519
1a4d82fc
JJ
520.summary {
521 padding-right: 0px;
522}
1a4d82fc 523
1a4d82fc
JJ
524.line-numbers :target { background-color: transparent; }
525
526/* Code highlighting */
527pre.rust .kw { color: #8959A8; }
528pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
529pre.rust .number, pre.rust .string { color: #718C00; }
530pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
531pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
1a4d82fc
JJ
532pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
533pre.rust .lifetime { color: #B76514; }
534
535.rusttest { display: none; }
536pre.rust { position: relative; }
b039eaaf 537a.test-arrow {
1a4d82fc
JJ
538 display: inline-block;
539 position: absolute;
b039eaaf 540 background-color: #4e8bca;
b039eaaf
SL
541 padding: 5px 10px 5px 10px;
542 border-radius: 5px;
543 font-size: 130%;
544 top: 5px;
545 right: 5px;
1a4d82fc
JJ
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}
c34b1796 555
1a4d82fc
JJ
556.section-header:hover a:after {
557 content: '\2002\00a7\2002';
558}
559
c34b1796
AL
560.section-header:hover a {
561 text-decoration: none;
562}
563
564.section-header a {
565 color: inherit;
566}
567
1a4d82fc
JJ
568.collapse-toggle {
569 font-weight: 300;
570 position: absolute;
d9579d0f 571 left: -23px;
1a4d82fc 572 color: #999;
d9579d0f 573 top: 0;
1a4d82fc
JJ
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;
d9579d0f 592 width: 1.2ch;
1a4d82fc
JJ
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 {
54a0048b 619 float: right;
1a4d82fc 620 margin: 0px;
54a0048b
SL
621 padding: 3px 10px 1px 10px;
622 min-height: 39px;
1a4d82fc
JJ
623 background: inherit;
624 text-align: left;
625 font-size: 24px;
626 }
627
54a0048b
SL
628 .sidebar .location:empty {
629 padding: 0;
630 }
631
1a4d82fc
JJ
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
85aaf69f
SL
651 .content .in-band {
652 width: 100%;
653 }
654
655 .content .out-of-band {
656 display: none;
657 }
658
1a4d82fc
JJ
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}