]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/main.css
auto merge of #15421 : catharsis/rust/doc-ffi-minor-fixes, r=alexcrichton
[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
74 h1 {
75     font-size: 1.5em;
76 }
77 h2 {
78     font-size: 1.4em;
79 }
80 h3 {
81     font-size: 1.3em;
82 }
83 h1, h2, h3:not(.impl):not(.method), h4:not(.method) {
84     color: black;
85     font-weight: 500;
86     margin: 20px 0 15px 0;
87     padding-bottom: 6px;
88 }
89 h1.fqn {
90     border-bottom: 1px dashed #D5D5D5;
91     margin-top: 0;
92 }
93 h2, h3:not(.impl):not(.method), h4:not(.method) {
94     border-bottom: 1px solid #DDDDDD;
95 }
96 h3.impl, h3.method, h4.method {
97     font-weight: 600;
98     margin-top: 10px;
99     margin-bottom: 10px;
100 }
101 h3.impl, h3.method {
102     margin-top: 15px;
103 }
104 h1, h2, h3, h4, section.sidebar, a.source, .search-input, .content table a {
105     font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
106 }
107
108 ol, ul {
109     padding-left: 25px;
110 }
111 ul ul, ol ul, ul ol, ol ol {
112     margin-bottom: 0;
113 }
114
115 p {
116     margin: 0 0 .6em 0;
117 }
118
119 code, pre {
120     font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
121     white-space: pre-wrap;
122 }
123 pre {
124     background-color: #F5F5F5;
125     padding: 14px;
126 }
127
128 .source pre {
129     padding: 20px;
130 }
131
132 nav.sub {
133     font-size: 16px;
134     text-transform: uppercase;
135 }
136
137 .sidebar {
138     width: 200px;
139     position: absolute;
140     left: 0;
141     top: 0;
142     min-height: 100%;
143 }
144
145 .content, nav { max-width: 960px; }
146
147 /* Everything else */
148
149 .js-only, .hidden { display: none; }
150
151 .sidebar {
152     padding: 10px;
153 }
154 .sidebar img {
155     margin: 20px auto;
156     display: block;
157 }
158
159 .sidebar .location {
160     font-size: 17px;
161     margin: 30px 0 20px 0;
162     background: #e1e1e1;
163     text-align: center;
164     color: #333;
165 }
166
167 .block {
168     padding: 0 10px;
169     margin-bottom: 14px;
170 }
171 .block h2 {
172     margin-top: 0;
173     margin-bottom: 8px;
174     text-align: center;
175 }
176
177 .block a {
178     display: block;
179     text-overflow: ellipsis;
180     overflow: hidden;
181     line-height: 15px;
182     padding: 7px 5px;
183     font-size: 14px;
184     font-weight: 300;
185     transition: border 500ms ease-out;
186 }
187
188 .block a:hover {
189     background: #F5F5F5;
190 }
191
192 .content {
193     padding: 15px 0;
194 }
195
196 .content.source pre.rust {
197     white-space: pre;
198     overflow: auto;
199     padding-left: 0;
200 }
201 .content pre.line-numbers { float: left; border: none; }
202 .line-numbers span { color: #c67e2d; }
203 .line-numbers .line-highlighted {
204     background-color: #f6fdb0;
205 }
206
207 .content .highlighted {
208     cursor: pointer;
209     color: #000 !important;
210     background-color: #ccc;
211 }
212 .content .highlighted a { color: #000 !important; }
213 .content .highlighted.trait { background-color: #fece7e; }
214 .content .highlighted.mod { background-color: #afc6e4; }
215 .content .highlighted.enum { background-color: #b4d1b9; }
216 .content .highlighted.struct { background-color: #e7b1a0; }
217 .content .highlighted.fn { background-color: #c6afb3; }
218
219 .docblock.short.nowrap {
220     display: block;
221     overflow: hidden;
222     white-space: nowrap;
223     text-overflow: ellipsis;
224 }
225
226 .docblock.short p {
227     overflow: hidden;
228     text-overflow: ellipsis;
229     margin: 0;
230 }
231 .docblock.short code { white-space: nowrap; }
232
233 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
234     border-bottom: 1px solid #DDD;
235 }
236
237 .docblock h1 { font-size: 1.3em; }
238 .docblock h2 { font-size: 1.15em; }
239 .docblock h3, .docblock h4, .docblock h5 { font-size: 1em; }
240
241 .content .out-of-band {
242     float: right;
243     font-size: 23px;
244 }
245
246 .content table {
247     border-spacing: 0 5px;
248     border-collapse: separate;
249 }
250 .content td { vertical-align: top; }
251 .content td:first-child { padding-right: 20px; }
252 .content td p:first-child { margin-top: 0; }
253 .content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
254
255 .content .item-list {
256     list-style-type: none;
257     padding: 0;
258 }
259
260 .content .item-list li { margin-bottom: 3px; }
261
262 .content .multi-column {
263     -moz-column-count: 5;
264     -moz-column-gap: 2.5em;
265     -webkit-column-count: 5;
266     -webkit-column-gap: 2.5em;
267     column-count: 5;
268     column-gap: 2.5em;
269 }
270 .content .multi-column li { width: 100%; display: inline-block; }
271
272 .content .method { font-size: 1em; }
273 .content .methods .docblock { margin-left: 40px; }
274
275 .content .impl-methods .docblock { margin-left: 40px; }
276
277 nav {
278     border-bottom: 1px solid #e0e0e0;
279     padding-bottom: 10px;
280     margin-bottom: 10px;
281 }
282 nav.main {
283     padding: 20px 0;
284     text-align: center;
285 }
286 nav.main .current {
287     border-top: 1px solid #000;
288     border-bottom: 1px solid #000;
289 }
290 nav.main .separator {
291     border: 1px solid #000;
292     display: inline-block;
293     height: 23px;
294     margin: 0 20px;
295 }
296 nav.sum { text-align: right; }
297 nav.sub form { display: inline; }
298
299 nav, .content {
300     margin-left: 230px;
301 }
302
303 a {
304     text-decoration: none;
305     color: #000;
306     background: transparent;
307 }
308 p a { color: #4e8bca; }
309 p a:hover { text-decoration: underline; }
310
311 .content a.trait, .block a.current.trait { color: #ed9603; }
312 .content a.mod, .block a.current.mod { color: #4d76ae; }
313 .content a.enum, .block a.current.enum { color: #5e9766; }
314 .content a.struct, .block a.current.struct { color: #e53700; }
315 .content a.fn, .block a.current.fn { color: #8c6067; }
316 .content .fnname { color: #8c6067; }
317
318 .search-input {
319     width: 100%;
320     /* Override Normalize.css: we have margins and do
321      not want to overflow - the `moz` attribute is necessary
322      until Firefox 29, too early to drop at this point */
323     -moz-box-sizing: border-box !important;
324     box-sizing: border-box !important;
325     outline: none;
326     border: none;
327     border-radius: 1px;
328     color: #555;
329     margin-top: 5px;
330     padding: 10px 16px;
331     font-size: 17px;
332     box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
333     transition: border-color 300ms ease;
334     transition: border-radius 300ms ease-in-out;
335     transition: box-shadow 300ms ease-in-out;
336 }
337
338 .search-input:focus {
339     border-color: #66afe9;
340     border-radius: 2px;
341     border: 0;
342     outline: 0;
343     box-shadow: 0 0 8px #078dd8;
344 }
345
346 .search-results .desc {
347     white-space: nowrap;
348     text-overflow: ellipsis;
349     overflow: hidden;
350     display: block;
351 }
352
353 #help {
354     background: #e9e9e9;
355     border-radius: 4px;
356     box-shadow: 0 0 6px rgba(0,0,0,.2);
357     position: absolute;
358     top: 300px;
359     left: 50%;
360     margin-top: -125px;
361     margin-left: -275px;
362     width: 550px;
363     height: 300px;
364     border: 1px solid #bfbfbf;
365 }
366
367 #help dt {
368     float: left;
369     border-radius: 3px;
370     border: 1px solid #bfbfbf;
371     background: #fff;
372     width: 23px;
373     text-align: center;
374     clear: left;
375     display: block;
376     margin-top: -1px;
377 }
378 #help dd { margin: 5px 33px; }
379 #help .infos { padding-left: 0; }
380 #help h1 { margin-top: 0; }
381 #help div {
382     width: 50%;
383     float: left;
384     padding: 20px;
385 }
386
387 .stability {
388     border-left: 6px solid;
389     padding: 3px 6px;
390     border-radius: 3px;
391 }
392
393 h1 .stability {
394     text-transform: lowercase;
395     font-weight: 400;
396     margin-left: 14px;
397     padding: 4px 10px;
398 }
399
400 .impl-methods .stability {
401     margin-right: 20px;
402 }
403
404 .stability.Deprecated { border-color: #A071A8; color: #82478C; }
405 .stability.Experimental { border-color: #D46D6A; color: #AA3C39; }
406 .stability.Unstable { border-color: #D4B16A; color: #AA8439; }
407 .stability.Stable { border-color: #54A759; color: #2D8632; }
408 .stability.Frozen { border-color: #009431; color: #007726; }
409 .stability.Locked { border-color: #0084B6; color: #00668c; }
410 .stability.Unmarked { border-color: #FFFFFF; }
411
412 .summary {
413     padding-right: 0px;
414 }
415 .summary.Deprecated { background-color: #A071A8; }
416 .summary.Experimental { background-color: #D46D6A; }
417 .summary.Unstable { background-color: #D4B16A; }
418 .summary.Stable { background-color: #54A759; }
419 .summary.Unmarked { background-color: #FFFFFF; }
420
421 :target { background: #FDFFD3; }
422
423 /* Code highlighting */
424 pre.rust .kw { color: #8959A8; }
425 pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
426 pre.rust .number, pre.rust .string { color: #718C00; }
427 pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
428 pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
429 pre.rust .comment { color: #8E908C; }
430 pre.rust .doccomment { color: #4D4D4C; }
431 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
432 pre.rust .lifetime { color: #B76514; }
433
434 .rusttest { display: none; }
435 pre.rust { position: relative; }
436 pre.rust a { transform: scaleX(-1); }
437 .test-arrow {
438     display: inline-block;
439     position: absolute;
440     top: 0;
441     right: 10px;
442     font-size: 150%;
443 }
444
445 .methods .section-header {
446     /* Override parent class attributes. */
447     border-bottom: none !important;
448     font-size: 1.1em !important;
449     margin: 0 0 -5px;
450     padding: 0;
451 }
452 .section-header:hover a:after {
453     content: '\2002\00a7\2002';
454 }
455
456 /* Media Queries */
457
458 @media (max-width: 700px) {
459     .sidebar {
460         display: none;
461     }
462
463     .content {
464         margin-left: 0px;
465     }
466
467     nav.sub {
468         margin: 0 auto;
469     }
470 }