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