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