]> git.lizzy.rs Git - rust.git/blob - src/doc/rust.css
rollup merge of #21437: FlaPer87/snapshot
[rust.git] / src / doc / rust.css
1 /**
2  * Copyright 2013-2014 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  * With elements taken from Bootstrap v3.0.2 (MIT licensed).
6  *
7  * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
8  * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
9  * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
10  * option. This file may not be copied, modified, or distributed
11  * except according to those terms.
12  */
13 @font-face {
14     font-family: 'Fira Sans';
15     font-style: normal;
16     font-weight: 400;
17     src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
18 }
19 @font-face {
20     font-family: 'Fira Sans';
21     font-style: normal;
22     font-weight: 500;
23     src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
24 }
25 @font-face {
26     font-family: 'Source Serif Pro';
27     font-style: normal;
28     font-weight: 400;
29     src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
30 }
31 @font-face {
32     font-family: 'Source Serif Pro';
33     font-style: italic;
34     font-weight: 400;
35     src: url("Heuristica-Italic.woff") format('woff');
36 }
37 @font-face {
38     font-family: 'Source Serif Pro';
39     font-style: normal;
40     font-weight: 700;
41     src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
42 }
43 @font-face {
44     font-family: 'Source Code Pro';
45     font-style: normal;
46     font-weight: 400;
47     src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
48 }
49
50 *:not(body) {
51   -webkit-box-sizing: border-box;
52      -moz-box-sizing: border-box;
53           box-sizing: border-box;
54 }
55
56 /* General structure */
57
58 body {
59     margin: 0 auto;
60     padding: 0 15px;
61     font-family: "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
62     font-size: 18px;
63     color: #333;
64     line-height: 1.428571429;
65
66     -webkit-font-feature-settings: "kern", "liga";
67     -moz-font-feature-settings: "kern", "liga";
68     font-feature-settings: "kern", "liga";
69 }
70 @media (min-width: 768px) {
71     body {
72         max-width: 750px;
73     }
74 }
75
76 h1, h2, h3, h4, h5, h6, nav, #versioninfo {
77     font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
78 }
79 h1, h2, h3, h4, h5, h6 {
80     color: black;
81     font-weight: 400;
82     line-height: 1.1;
83 }
84 h1, h2, h3 {
85     margin-top: 20px;
86     margin-bottom: 15px;
87 }
88 h1 {
89     margin-bottom: 20px;
90 }
91 h4, h5, h6 {
92     margin-top: 12px;
93     margin-bottom: 10px;
94     padding: 5px 10px;
95 }
96 h5, h6 {
97     text-decoration: underline;
98 }
99
100 h1 {
101     font-size: 28px;
102     font-weight: 500;
103     padding: .1em .4em;
104     border-bottom: 2px solid #ddd;
105 }
106 h1.title {
107     line-height: 1.5em;
108 }
109 h2 {
110     font-size: 26px;
111     padding: .2em .5em;
112     border-bottom: 1px solid #ddd;
113 }
114 h3 {
115     font-size: 24px;
116     padding: .2em .7em;
117     border-bottom: 1px solid #DDE8FC;
118 }
119 h4 {
120     font-size: 22px;
121 }
122 h5 {
123     font-size: 20px;
124 }
125 h6 {
126     font-size: 18px;
127 }
128 @media (min-width: 992px) {
129     h1 {
130         font-size: 36px;
131     }
132     h2 {
133         font-size: 30px;
134     }
135     h3 {
136         font-size: 26px;
137     }
138 }
139
140 nav {
141     column-count: 2;
142     -moz-column-count: 2;
143     -webkit-column-count: 2;
144     font-size: 15px;
145     margin: 0 0 1em 0;
146 }
147 p {
148     margin: 0 0 1em 0;
149 }
150
151 strong {
152     font-weight: bold;
153 }
154
155 em {
156     font-style: italic;
157 }
158
159 footer {
160     border-top: 1px solid #ddd;
161     font-size: 14.3px;
162     font-style: italic;
163     padding-top: 5px;
164     margin-top: 3em;
165     margin-bottom: 1em;
166 }
167
168 /* Links layout */
169
170 a {
171     text-decoration: none;
172     color: #428BCA;
173     background: transparent;
174 }
175 a:hover, a:focus {
176     color: #2A6496;
177     text-decoration: underline;
178 }
179 a:focus {
180     outline: thin dotted #333;
181     outline: 5px auto -webkit-focus-ring-color;
182     outline-offset: -2px;
183 }
184 a:hover, a:active {
185     outline: 0;
186 }
187
188 h1 a:link, h1 a:visited, h2 a:link, h2 a:visited,
189 h3 a:link, h3 a:visited, h4 a:link, h4 a:visited,
190 h5 a:link, h5 a:visited {color: black;}
191 h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
192 h5 a:hover {text-decoration: none;}
193
194 /* Code */
195
196 pre, code {
197     font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
198     word-wrap: break-word;
199 }
200 pre {
201     border-left: 2px solid #eee;
202     white-space: pre-wrap;
203     padding: 14px;
204     padding-right: 0;
205     margin: 20px 0;
206     font-size: 13px;
207     word-break: break-all;
208 }
209 code {
210     padding: 0 2px;
211     color: #8D1A38;
212 }
213 pre code {
214     padding: 0;
215     font-size: inherit;
216     color: inherit;
217 }
218
219 a > code {
220     color: #428BCA;
221 }
222
223 /* Code highlighting */
224 pre.rust .kw { color: #8959A8; }
225 pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
226 pre.rust .number, pre.rust .string { color: #718C00; }
227 pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
228 pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
229 pre.rust .comment { color: #8E908C; }
230 pre.rust .doccomment { color: #4D4D4C; }
231 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
232 pre.rust .lifetime { color: #B76514; }
233
234 /* The rest */
235
236 #versioninfo {
237     text-align: center;
238     margin: 0.5em;
239     font-size: 1.1em;
240 }
241 @media (min-width: 992px) {
242     #versioninfo {
243         font-size: 0.8em;
244         position: fixed;
245         bottom: 0px;
246         right: 0px;
247     }
248     .white-sticker {
249         background-color: #fff;
250         margin: 2px;
251         padding: 0 2px;
252         border-radius: .2em;
253     }
254 }
255 #versioninfo a.hash {
256     color: gray;
257     font-size: 80%;
258 }
259
260 blockquote {
261     color: #000;
262     margin: 20px 0;
263     padding: 15px 20px;
264     background-color: #f2f7f9;
265     border-top: .1em solid #e5eef2;
266     border-bottom: .1em solid #e5eef2;
267 }
268 blockquote p {
269     font-size: 17px;
270     font-weight: 300;
271     line-height: 1.4;
272 }
273 blockquote p:last-child {
274     margin-bottom: 0;
275 }
276
277 ul, ol {
278     padding-left: 25px;
279 }
280 ul ul, ol ul, ul ol, ol ol {
281     margin-bottom: 0;
282 }
283 dl {
284     margin-bottom: 20px;
285 }
286 dd {
287     margin-left: 0;
288 }
289
290 nav ul {
291     list-style-type: none;
292     margin: 0;
293     padding-left: 0px;
294 }
295
296 /* Only display one level of hierarchy in the TOC */
297 nav ul ul {
298     display: none;
299 }
300
301 sub,
302 sup {
303     font-size: 75%;
304     line-height: 0;
305     position: relative;
306 }
307
308 hr {
309     margin-top: 20px;
310     margin-bottom: 20px;
311     border: 0;
312     border-top: 1px solid #eeeeee;
313 }
314
315 table {
316     border-collapse: collapse;
317     border-spacing: 0;
318     overflow-x: auto;
319     display: block;
320 }
321
322 table tr.odd {
323     background: #eee;
324 }
325
326 table td,
327 table th {
328     border: 1px solid #ddd;
329     padding: 5px;
330 }
331
332 /* Code snippets */
333
334 .rusttest { display: none; }
335 pre.rust { position: relative; }
336 .test-arrow {
337     display: inline-block;
338     position: absolute;
339     top: 0;
340     right: 10px;
341     font-size: 150%;
342     -webkit-transform: scaleX(-1);
343     transform: scaleX(-1);
344 }
345
346 .unstable-feature {
347     border: 2px solid red;
348     padding: 5px;
349 }
350
351 @media (min-width: 1170px) {
352     pre {
353         font-size: 15px;
354     }
355 }
356
357 @media print {
358     * {
359         text-shadow: none !important;
360         color: #000 !important;
361         background: transparent !important;
362         box-shadow: none !important;
363     }
364     a, a:visited {
365         text-decoration: underline;
366     }
367     p a[href]:after {
368         content: " (" attr(href) ")";
369     }
370     footer a[href]:after {
371         content: "";
372     }
373     a[href^="javascript:"]:after, a[href^="#"]:after {
374         content: "";
375     }
376     pre, blockquote {
377         border: 1px solid #999;
378         page-break-inside: avoid;
379     }
380     @page {
381         margin: 2cm .5cm;
382     }
383     h1:not(.title), h2, h3 {
384         border-bottom: 0px none;
385     }
386     p, h2, h3 {
387         orphans: 3;
388         widows: 3;
389     }
390     h2, h3 {
391         page-break-after: avoid;
392     }
393     table {
394         border-collapse: collapse !important;
395     }
396     table td, table th {
397         background-color: #fff !important;
398     }
399 }
400
401 #keyword-table-marker + table thead { display: none; }
402 #keyword-table-marker + table td { border: none; }
403 #keyword-table-marker + table {
404     margin-left: 2em;
405     margin-bottom: 1em;
406 }