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