]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/main.css
Do not use entropy during gen_weighted_bool(1)
[rust.git] / src / librustdoc / html / static / main.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 @font-face {
13     font-family: 'Fira Sans';
14     font-style: normal;
15     font-weight: 400;
16     src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
17 }
18 @font-face {
19     font-family: 'Fira Sans';
20     font-style: normal;
21     font-weight: 500;
22     src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
23 }
24 @font-face {
25     font-family: 'Source Serif Pro';
26     font-style: normal;
27     font-weight: 400;
28     src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
29 }
30 @font-face {
31     font-family: 'Source Serif Pro';
32     font-style: italic;
33     font-weight: 400;
34     src: url("Heuristica-Italic.woff") format('woff');
35 }
36 @font-face {
37     font-family: 'Source Serif Pro';
38     font-style: normal;
39     font-weight: 700;
40     src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
41 }
42 @font-face {
43     font-family: 'Source Code Pro';
44     font-style: normal;
45     font-weight: 400;
46     src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
47 }
48 @font-face {
49     font-family: 'Source Code Pro';
50     font-style: normal;
51     font-weight: 600;
52     src: local('Source Code Pro Semibold'), url("SourceCodePro-Semibold.woff") format('woff');
53 }
54
55 @import "normalize.css";
56
57 * {
58   -webkit-box-sizing: border-box;
59      -moz-box-sizing: border-box;
60           box-sizing: border-box;
61 }
62
63 /* General structure and fonts */
64
65 body {
66     color: #333;
67     min-width: 500px;
68     font: 16px/1.4 "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
69     margin: 0;
70     position: relative;
71     padding: 10px 15px 20px 15px;
72
73     -webkit-font-feature-settings: "kern", "liga";
74     -moz-font-feature-settings: "kern", "liga";
75     font-feature-settings: "kern", "liga";
76 }
77
78 h1 {
79     font-size: 1.5em;
80 }
81 h2 {
82     font-size: 1.4em;
83 }
84 h3 {
85     font-size: 1.3em;
86 }
87 h1, h2, h3:not(.impl):not(.method):not(.type), h4:not(.method):not(.type) {
88     color: black;
89     font-weight: 500;
90     margin: 20px 0 15px 0;
91     padding-bottom: 6px;
92 }
93 h1.fqn {
94     border-bottom: 1px dashed #D5D5D5;
95     margin-top: 0;
96 }
97 h2, h3:not(.impl):not(.method):not(.type), h4:not(.method):not(.type) {
98     border-bottom: 1px solid #DDDDDD;
99 }
100 h3.impl, h3.method, h4.method, h3.type, h4.type {
101     font-weight: 600;
102     margin-top: 10px;
103     margin-bottom: 10px;
104 }
105 h3.impl, h3.method, h3.type {
106     margin-top: 15px;
107 }
108 h1, h2, h3, h4, section.sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
109     font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
110 }
111
112 ol, ul {
113     padding-left: 25px;
114 }
115 ul ul, ol ul, ul ol, ol ol {
116     margin-bottom: 0;
117 }
118
119 p {
120     margin: 0 0 .6em 0;
121 }
122
123 code, pre {
124     font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
125     white-space: pre-wrap;
126 }
127 .docblock code {
128     background-color: #F5F5F5;
129     border-radius: 3px;
130     padding: 0 0.2em;
131 }
132 pre {
133     background-color: #F5F5F5;
134     padding: 14px;
135 }
136
137 .source pre {
138     padding: 20px;
139 }
140
141 .content.source {
142     margin-top: 50px;
143     max-width: none;
144     overflow: visible;
145     margin-left: 0px;
146     min-width: 70em;
147 }
148
149 nav.sub {
150     font-size: 16px;
151     text-transform: uppercase;
152 }
153
154 .sidebar {
155     width: 200px;
156     position: absolute;
157     left: 0;
158     top: 0;
159     min-height: 100%;
160 }
161
162 .content, nav { max-width: 960px; }
163
164 /* Everything else */
165
166 .js-only, .hidden { display: none; }
167
168 .sidebar {
169     padding: 10px;
170 }
171 .sidebar img {
172     margin: 20px auto;
173     display: block;
174 }
175
176 .sidebar .location {
177     font-size: 17px;
178     margin: 30px 0 20px 0;
179     background: #e1e1e1;
180     text-align: center;
181     color: #333;
182 }
183
184 .location a:first-child { font-weight: 500; }
185
186 .block {
187     padding: 0 10px;
188     margin-bottom: 14px;
189 }
190 .block h2 {
191     margin-top: 0;
192     margin-bottom: 8px;
193     text-align: center;
194 }
195
196 .block a {
197     display: block;
198     text-overflow: ellipsis;
199     overflow: hidden;
200     line-height: 15px;
201     padding: 7px 5px;
202     font-size: 14px;
203     font-weight: 300;
204     transition: border 500ms ease-out;
205 }
206
207 .block a:hover {
208     background: #F5F5F5;
209 }
210
211 .content {
212     padding: 15px 0;
213 }
214
215 .content.source pre.rust {
216     white-space: pre;
217     overflow: auto;
218     padding-left: 0;
219 }
220 .content pre.line-numbers { float: left; border: none; }
221 .line-numbers span { color: #c67e2d; }
222 .line-numbers .line-highlighted {
223     background-color: #f6fdb0;
224 }
225
226 .content .highlighted {
227     color: #000 !important;
228     background-color: #ccc;
229 }
230 .content .highlighted a, .content .highlighted span { color: #000 !important; }
231 .content .highlighted.trait { background-color: #fece7e; }
232 .content .highlighted.mod { background-color: #afc6e4; }
233 .content .highlighted.enum { background-color: #b4d1b9; }
234 .content .highlighted.struct { background-color: #e7b1a0; }
235 .content .highlighted.fn { background-color: #c6afb3; }
236 .content .highlighted.method { background-color: #c6afb3; }
237 .content .highlighted.tymethod { background-color: #c6afb3; }
238 .content .highlighted.type { background-color: #c6afb3; }
239 .content .highlighted.ffi { background-color: #c6afb3; }
240
241 .docblock.short.nowrap {
242     display: block;
243     overflow: hidden;
244     white-space: nowrap;
245     text-overflow: ellipsis;
246 }
247
248 .docblock.short p {
249     overflow: hidden;
250     text-overflow: ellipsis;
251     margin: 0;
252 }
253 .docblock.short code { white-space: nowrap; }
254
255 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
256     border-bottom: 1px solid #DDD;
257 }
258
259 .docblock h1 { font-size: 1.3em; }
260 .docblock h2 { font-size: 1.15em; }
261 .docblock h3, .docblock h4, .docblock h5 { font-size: 1em; }
262
263 .content .out-of-band {
264     font-size: 23px;
265     width: 40%;
266     margin: 0px;
267     padding: 0px;
268     text-align: right;
269     display: inline-block;
270 }
271
272 .content .in-band {
273     width: 60%;
274     margin: 0px;
275     padding: 0px;
276     display: inline-block;
277 }
278
279 .content table {
280     border-spacing: 0 5px;
281     border-collapse: separate;
282 }
283 .content td { vertical-align: top; }
284 .content td:first-child { padding-right: 20px; }
285 .content td p:first-child { margin-top: 0; }
286 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
287
288 .content .item-list {
289     list-style-type: none;
290     padding: 0;
291 }
292
293 .content .item-list li { margin-bottom: 3px; }
294
295 .content .multi-column {
296     -moz-column-count: 5;
297     -moz-column-gap: 2.5em;
298     -webkit-column-count: 5;
299     -webkit-column-gap: 2.5em;
300     column-count: 5;
301     column-gap: 2.5em;
302 }
303 .content .multi-column li { width: 100%; display: inline-block; }
304
305 .content .method {
306     font-size: 1em;
307     position: relative;
308 }
309 /* Shift "where ..." part of method definition down a line */
310 .content .method .where { display: block; }
311 /* Bit of whitespace to indent it */
312 .content .method .where::before { content: '      '; }
313
314 .content .methods .docblock { margin-left: 40px; }
315
316 .content .impl-items .docblock { margin-left: 40px; }
317
318 nav {
319     border-bottom: 1px solid #e0e0e0;
320     padding-bottom: 10px;
321     margin-bottom: 10px;
322 }
323 nav.main {
324     padding: 20px 0;
325     text-align: center;
326 }
327 nav.main .current {
328     border-top: 1px solid #000;
329     border-bottom: 1px solid #000;
330 }
331 nav.main .separator {
332     border: 1px solid #000;
333     display: inline-block;
334     height: 23px;
335     margin: 0 20px;
336 }
337 nav.sum { text-align: right; }
338 nav.sub form { display: inline; }
339
340 nav, .content {
341     margin-left: 230px;
342 }
343
344 a {
345     text-decoration: none;
346     color: #000;
347     background: transparent;
348 }
349 p a { color: #4e8bca; }
350 p a:hover { text-decoration: underline; }
351
352 .content span.trait, .content a.trait, .block a.current.trait { color: #ed9603; }
353 .content span.mod, .content a.mod, block a.current.mod { color: #4d76ae; }
354 .content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
355 .content span.struct, .content a.struct, .block a.current.struct { color: #e53700; }
356 .content span.fn, .content a.fn, .block a.current.fn { color: #8c6067; }
357 .content span.method, .content a.method, .block a.current.method { color: #8c6067; }
358 .content span.tymethod, .content a.tymethod, .block a.current.tymethod { color: #8c6067; }
359 .content span.ffi, .content a.ffi, .block a.current.ffi { color: #8c6067; }
360 .content .fnname { color: #8c6067; }
361
362 .search-input {
363     width: 100%;
364     /* Override Normalize.css: we have margins and do
365      not want to overflow - the `moz` attribute is necessary
366      until Firefox 29, too early to drop at this point */
367     -moz-box-sizing: border-box !important;
368     box-sizing: border-box !important;
369     outline: none;
370     border: none;
371     border-radius: 1px;
372     color: #555;
373     margin-top: 5px;
374     padding: 10px 16px;
375     font-size: 17px;
376     box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
377     transition: border-color 300ms ease;
378     transition: border-radius 300ms ease-in-out;
379     transition: box-shadow 300ms ease-in-out;
380 }
381
382 .search-input:focus {
383     border-color: #66afe9;
384     border-radius: 2px;
385     border: 0;
386     outline: 0;
387     box-shadow: 0 0 8px #078dd8;
388 }
389
390 .search-results .desc {
391     white-space: nowrap;
392     text-overflow: ellipsis;
393     overflow: hidden;
394     display: block;
395 }
396
397 .search-results a {
398     display: block;
399 }
400
401 .content .search-results td:first-child { padding-right: 0; }
402 .content .search-results td:first-child a { padding-right: 10px; }
403
404 #help {
405     background: #e9e9e9;
406     border-radius: 4px;
407     box-shadow: 0 0 6px rgba(0,0,0,.2);
408     position: absolute;
409     top: 300px;
410     left: 50%;
411     margin-top: -125px;
412     margin-left: -275px;
413     width: 550px;
414     height: 300px;
415     border: 1px solid #bfbfbf;
416 }
417
418 #help dt {
419     float: left;
420     border-radius: 3px;
421     border: 1px solid #bfbfbf;
422     background: #fff;
423     width: 23px;
424     text-align: center;
425     clear: left;
426     display: block;
427     margin-top: -1px;
428 }
429 #help dd { margin: 5px 33px; }
430 #help .infos { padding-left: 0; }
431 #help h1 { margin-top: 0; }
432 #help div {
433     width: 50%;
434     float: left;
435     padding: 20px;
436 }
437
438 .stability {
439     border-left: 6px solid;
440     padding: 3px 6px;
441     border-radius: 3px;
442 }
443
444 h1 .stability {
445     text-transform: lowercase;
446     font-weight: 400;
447     margin-left: 14px;
448     padding: 4px 10px;
449 }
450
451 .impl-items .stability, .methods .stability {
452     margin-right: 20px;
453 }
454
455 .stability.Deprecated { border-color: #A071A8; color: #82478C; }
456 .stability.Experimental { border-color: #D46D6A; color: #AA3C39; }
457 .stability.Unstable { border-color: #D4B16A; color: #AA8439; }
458 .stability.Stable { border-color: #54A759; color: #2D8632; }
459 .stability.Frozen { border-color: #009431; color: #007726; }
460 .stability.Locked { border-color: #0084B6; color: #00668c; }
461 .stability.Unmarked { border-color: #BBBBBB; }
462
463 .summary {
464     padding-right: 0px;
465 }
466 .summary.Deprecated { background-color: #A071A8; }
467 .summary.Experimental { background-color: #D46D6A; }
468 .summary.Unstable { background-color: #D4B16A; }
469 .summary.Stable { background-color: #54A759; }
470 .summary.Unmarked { background-color: #BBBBBB; }
471
472 :target { background: #FDFFD3; }
473
474 /* Code highlighting */
475 pre.rust .kw { color: #8959A8; }
476 pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
477 pre.rust .number, pre.rust .string { color: #718C00; }
478 pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
479 pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
480 pre.rust .comment { color: #8E908C; }
481 pre.rust .doccomment { color: #4D4D4C; }
482 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
483 pre.rust .lifetime { color: #B76514; }
484
485 .rusttest { display: none; }
486 pre.rust { position: relative; }
487 .test-arrow {
488     display: inline-block;
489     position: absolute;
490     top: 0;
491     right: 10px;
492     font-size: 150%;
493     -webkit-transform: scaleX(-1);
494     transform: scaleX(-1);
495 }
496
497 .methods .section-header {
498     /* Override parent class attributes. */
499     border-bottom: none !important;
500     font-size: 1.1em !important;
501     margin: 0 0 -5px;
502     padding: 0;
503 }
504 .section-header:hover a:after {
505     content: '\2002\00a7\2002';
506 }
507
508 .collapse-toggle {
509     font-weight: 300;
510     position: absolute;
511     left: 13px;
512     color: #999;
513     margin-top: 2px;
514 }
515
516 .toggle-wrapper > .collapse-toggle {
517     left: -24px;
518     margin-top: 0px;
519 }
520
521 .toggle-wrapper {
522     position: relative;
523 }
524
525 .toggle-wrapper.collapsed {
526     height: 1em;
527     transition: height .2s;
528 }
529
530 .collapse-toggle > .inner {
531     display: inline-block;
532     width: 1ch;
533     text-align: center;
534 }
535
536 .toggle-label {
537     color: #999;
538 }
539
540
541
542 /* Media Queries */
543
544 @media (max-width: 700px) {
545     body {
546         padding-top: 0px;
547     }
548
549     .sidebar {
550         height: 40px;
551         min-height: 40px;
552         width: 100%;
553         margin: 0px;
554         padding: 0px;
555         position: static;
556     }
557
558     .sidebar .location {
559         float: left;
560         margin: 0px;
561         padding: 5px;
562         width: 60%;
563         background: inherit;
564         text-align: left;
565         font-size: 24px;
566     }
567
568     .sidebar img {
569         width: 35px;
570         margin-top: 5px;
571         margin-bottom: 0px;
572         float: left;
573     }
574
575     nav.sub {
576         margin: 0 auto;
577     }
578
579     .sidebar .block {
580         display: none;
581     }
582
583     .content {
584         margin-left: 0px;
585     }
586
587     .toggle-wrapper > .collapse-toggle {
588         left: 0px;
589     }
590
591     .toggle-wrapper {
592         height: 1.5em;
593     }
594 }
595
596 @media print {
597     nav.sub, .content .out-of-band, .collapse-toggle {
598         display: none;
599     }
600 }