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