]> git.lizzy.rs Git - rust.git/blob - src/doc/rust.css
9656d17721e47ca704def34156eb85f95d7ba69b
[rust.git] / src / doc / rust.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  * 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 }
199 pre {
200     border-left: 2px solid #eee;
201     white-space: pre-wrap;
202     padding: 14px;
203     padding-right: 0;
204     margin: 20px 0;
205     font-size: 13px;
206     word-break: break-all;
207     word-wrap: break-word;
208 }
209 code {
210     padding: 0 2px;
211     color: #8D1A38;
212     white-space: pre-wrap;
213 }
214 pre code {
215     padding: 0;
216     font-size: inherit;
217     color: inherit;
218 }
219
220 a > code {
221     color: #428BCA;
222 }
223
224 /* Code highlighting */
225 pre.rust .kw { color: #8959A8; }
226 pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
227 pre.rust .number, pre.rust .string { color: #718C00; }
228 pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
229 pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
230 pre.rust .comment { color: #8E908C; }
231 pre.rust .doccomment { color: #4D4D4C; }
232 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
233 pre.rust .lifetime { color: #B76514; }
234
235 /* The rest */
236
237 #versioninfo {
238     text-align: center;
239     margin: 0.5em;
240     font-size: 1.1em;
241 }
242 @media (min-width: 992px) {
243     #versioninfo {
244         font-size: 0.8em;
245         position: fixed;
246         bottom: 0px;
247         right: 0px;
248     }
249     .white-sticker {
250         background-color: #fff;
251         margin: 2px;
252         padding: 0 2px;
253         border-radius: .2em;
254     }
255 }
256 #versioninfo a.hash {
257     color: gray;
258     font-size: 80%;
259 }
260
261 blockquote {
262     color: #000;
263     margin: 20px 0;
264     padding: 15px 20px;
265     background-color: #f2f7f9;
266     border-top: .1em solid #e5eef2;
267     border-bottom: .1em solid #e5eef2;
268 }
269 blockquote p {
270     font-size: 17px;
271     font-weight: 300;
272     line-height: 1.4;
273 }
274 blockquote p:last-child {
275     margin-bottom: 0;
276 }
277
278 ul, ol {
279     padding-left: 25px;
280 }
281 ul ul, ol ul, ul ol, ol ol {
282     margin-bottom: 0;
283 }
284 dl {
285     margin-bottom: 20px;
286 }
287 dd {
288     margin-left: 0;
289 }
290
291 nav ul {
292     list-style-type: none;
293     margin: 0;
294     padding-left: 0px;
295 }
296
297 /* Only display one level of hierarchy in the TOC */
298 nav ul ul {
299     display: none;
300 }
301
302 sub,
303 sup {
304     font-size: 75%;
305     line-height: 0;
306     position: relative;
307 }
308
309 hr {
310     margin-top: 20px;
311     margin-bottom: 20px;
312     border: 0;
313     border-top: 1px solid #eeeeee;
314 }
315
316 table {
317     border-collapse: collapse;
318     border-spacing: 0;
319 }
320
321 table tr.odd {
322     background: #eee;
323 }
324
325 table td,
326 table th {
327     border: 1px solid #ddd;
328     padding: 5px;
329 }
330
331 /* Code snippets */
332
333 .rusttest { display: none; }
334 pre.rust { position: relative; }
335 .test-arrow {
336     display: inline-block;
337     position: absolute;
338     top: 0;
339     right: 10px;
340     font-size: 150%;
341     -webkit-transform: scaleX(-1);
342     transform: scaleX(-1);
343 }
344
345 .unstable-feature {
346     border: 2px solid red;
347     padding: 5px;
348 }
349
350 @media (min-width: 1170px) {
351     pre {
352         font-size: 15px;
353     }
354 }
355
356 @media print {
357     * {
358         text-shadow: none !important;
359         color: #000 !important;
360         background: transparent !important;
361         box-shadow: none !important;
362     }
363     a, a:visited {
364         text-decoration: underline;
365     }
366     p a[href]:after {
367         content: " (" attr(href) ")";
368     }
369     footer a[href]:after {
370         content: "";
371     }
372     a[href^="javascript:"]:after, a[href^="#"]:after {
373         content: "";
374     }
375     pre, blockquote {
376         border: 1px solid #999;
377         page-break-inside: avoid;
378     }
379     @page {
380         margin: 2cm .5cm;
381     }
382     h1:not(.title), h2, h3 {
383         border-bottom: 0px none;
384     }
385     p, h2, h3 {
386         orphans: 3;
387         widows: 3;
388     }
389     h2, h3 {
390         page-break-after: avoid;
391     }
392     table {
393         border-collapse: collapse !important;
394     }
395     table td, table th {
396         background-color: #fff !important;
397     }
398 }
399
400 #keyword-table-marker + table thead { display: none; }
401 #keyword-table-marker + table td { border: none; }
402 #keyword-table-marker + table {
403     margin-left: 2em;
404     margin-bottom: 1em;
405 }