]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/main.css
a88992f6c4c508344f3ebac359ff0bdfb0f69072
[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: 'Heuristica';
26     font-style: normal;
27     font-weight: 400;
28     src: local('Heuristica Regular'), url("Heuristica-Regular.woff") format('woff');
29 }
30 @font-face {
31     font-family: 'Heuristica';
32     font-style: italic;
33     font-weight: 400;
34     src: local('Heuristica Italic'), url("Heuristica-Italic.woff") format('woff');
35 }
36 @font-face {
37     font-family: 'Heuristica';
38     font-style: normal;
39     font-weight: 700;
40     src: local('Heuristica Bold'), url("Heuristica-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: 15.5px/1.4 "Heuristica", "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 { margin-left: 20px; }
262 .content .methods .docblock { margin-left: 20px; }
263
264 nav {
265     border-bottom: 1px solid #e0e0e0;
266     padding-bottom: 10px;
267     margin-bottom: 10px;
268 }
269 nav.main {
270     padding: 20px 0;
271     text-align: center;
272 }
273 nav.main .current {
274     border-top: 1px solid #000;
275     border-bottom: 1px solid #000;
276 }
277 nav.main .separator {
278     border: 1px solid #000;
279     display: inline-block;
280     height: 23px;
281     margin: 0 20px;
282 }
283 nav.sum { text-align: right; }
284 nav.sub form { display: inline; }
285
286 nav, .content {
287     margin-left: 230px;
288 }
289
290 a {
291     text-decoration: none;
292     color: #000;
293     background: transparent;
294 }
295 p a { color: #4e8bca; }
296 p a:hover { text-decoration: underline; }
297
298 .content a.trait, .block a.current.trait { color: #ed9603; }
299 .content a.mod, .block a.current.mod { color: #4d76ae; }
300 .content a.enum, .block a.current.enum { color: #5e9766; }
301 .content a.struct, .block a.current.struct { color: #e53700; }
302 .content a.fn, .block a.current.fn { color: #8c6067; }
303 .content .fnname { color: #8c6067; }
304
305 .search-input {
306     width: 100%;
307     /* Override Normalize.css: we have margins and do
308      not want to overflow - the `moz` attribute is necessary
309      until Firefox 29, too early to drop at this point */
310     -moz-box-sizing: border-box !important;
311     box-sizing: border-box !important;
312     outline: none;
313     border: none;
314     border-radius: 1px;
315     color: #555;
316     margin-top: 5px;
317     padding: 10px 16px;
318     font-size: 17px;
319     box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
320     transition: border-color 300ms ease;
321     transition: border-radius 300ms ease-in-out;
322     transition: box-shadow 300ms ease-in-out;
323 }
324
325 .search-input:focus {
326     border-color: #66afe9;
327     border-radius: 2px;
328     border: 0;
329     outline: 0;
330     box-shadow: 0 0 8px #078dd8;
331 }
332
333 .search-results .desc {
334     white-space: nowrap;
335     text-overflow: ellipsis;
336     overflow: hidden;
337     display: block;
338 }
339
340 #help {
341     background: #e9e9e9;
342     border-radius: 4px;
343     box-shadow: 0 0 6px rgba(0,0,0,.2);
344     position: absolute;
345     top: 300px;
346     left: 50%;
347     margin-top: -125px;
348     margin-left: -275px;
349     width: 550px;
350     height: 300px;
351     border: 1px solid #bfbfbf;
352 }
353
354 #help dt {
355     float: left;
356     border-radius: 3px;
357     border: 1px solid #bfbfbf;
358     background: #fff;
359     width: 23px;
360     text-align: center;
361     clear: left;
362     display: block;
363     margin-top: -1px;
364 }
365 #help dd { margin: 5px 33px; }
366 #help .infos { padding-left: 0; }
367 #help h1 { margin-top: 0; }
368 #help div {
369     width: 50%;
370     float: left;
371     padding: 20px;
372 }
373
374 .stability {
375     border-left: 6px solid #000;
376     border-radius: 3px;
377     font-weight: 400;
378     padding: 4px 10px;
379     text-transform: lowercase;
380     margin-left: 14px;
381 }
382
383 .stability.Deprecated { border-color: #D60027; color: #880017; }
384 .stability.Experimental { border-color: #EC5315; color: #a53c0e; }
385 .stability.Unstable { border-color: #FFD700; color: #b39800; }
386 .stability.Stable { border-color: #AEC516; color: #7c8b10; }
387 .stability.Frozen { border-color: #009431; color: #007726; }
388 .stability.Locked { border-color: #0084B6; color: #00668c; }
389
390 :target { background: #FDFFD3; }
391
392 /* Code highlighting */
393 pre.rust .kw { color: #8959A8; }
394 pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
395 pre.rust .number, pre.rust .string { color: #718C00; }
396 pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
397 pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
398 pre.rust .comment { color: #8E908C; }
399 pre.rust .doccomment { color: #4D4D4C; }
400 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
401 pre.rust .lifetime { color: #B76514; }
402
403 .rusttest { display: none; }
404 pre.rust { position: relative; }
405 pre.rust a { transform: scaleX(-1); }
406 .test-arrow {
407     display: inline-block;
408     position: absolute;
409     top: 0;
410     right: 10px;
411     font-size: 150%;
412 }
413
414 .methods .section-header {
415     /* Override parent class attributes. */
416     border-bottom: none !important;
417     font-size: 1.1em !important;
418     margin: 0 0 -5px;
419     padding: 0;
420 }
421 .section-header:hover a:after {
422     content: '\2002\00a7\2002';
423 }
424
425 /* Media Queries */
426
427 @media (max-width: 700px) {
428     .sidebar {
429         display: none;
430     }
431
432     .content {
433         margin-left: 0px;
434     }
435
436     nav.sub {
437         margin: 0 auto;
438     }
439 }