]> git.lizzy.rs Git - rust.git/blob - src/doc/rust.css
Remove licenses
[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         /* Avoid using locally installed font because bad versions are in circulation:
48          * see https://github.com/rust-lang/rust/issues/24355 */
49         src: url("SourceCodePro-Regular.woff") format('woff');
50 }
51
52 *:not(body) {
53   -webkit-box-sizing: border-box;
54          -moz-box-sizing: border-box;
55                   box-sizing: border-box;
56 }
57
58 /* General structure */
59
60 body {
61         background-color: white;
62         margin: 0 auto;
63         padding: 0 15px;
64         font-family: "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
65         font-size: 18px;
66         color: #333;
67         line-height: 1.428571429;
68
69         -webkit-font-feature-settings: "kern", "liga";
70         -moz-font-feature-settings: "kern", "liga";
71         font-feature-settings: "kern", "liga";
72 }
73 @media (min-width: 768px) {
74         body {
75                 max-width: 750px;
76         }
77 }
78
79 h1, h2, h3, h4, h5, h6, nav, #versioninfo {
80         font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
81 }
82 h1, h2, h3, h4, h5, h6 {
83         color: black;
84         font-weight: 400;
85         line-height: 1.1;
86 }
87 h1, h2, h3 {
88         margin-top: 20px;
89         margin-bottom: 15px;
90 }
91 h1 {
92         margin-bottom: 20px;
93 }
94 h4, h5, h6 {
95         margin-top: 12px;
96         margin-bottom: 10px;
97         padding: 5px 10px;
98 }
99 h5, h6 {
100         text-decoration: underline;
101 }
102
103 h1 {
104         font-size: 28px;
105         font-weight: 500;
106         padding: .1em .4em;
107         border-bottom: 2px solid #ddd;
108 }
109 h1.title {
110         line-height: 1.5em;
111 }
112 h2 {
113         font-size: 26px;
114         padding: .2em .5em;
115         border-bottom: 1px solid #ddd;
116 }
117 h3 {
118         font-size: 24px;
119         padding: .2em .7em;
120         border-bottom: 1px solid #DDE8FC;
121 }
122 h4 {
123         font-size: 22px;
124 }
125 h5 {
126         font-size: 20px;
127 }
128 h6 {
129         font-size: 18px;
130 }
131 @media (min-width: 992px) {
132         h1 {
133                 font-size: 36px;
134         }
135         h2 {
136                 font-size: 30px;
137         }
138         h3 {
139                 font-size: 26px;
140         }
141 }
142
143 nav {
144         column-count: 2;
145         -moz-column-count: 2;
146         -webkit-column-count: 2;
147         font-size: 15px;
148         margin: 0 0 1em 0;
149 }
150 p {
151         margin: 0 0 1em 0;
152 }
153
154 strong {
155         font-weight: bold;
156 }
157
158 em {
159         font-style: italic;
160 }
161
162 footer {
163         border-top: 1px solid #ddd;
164         font-size: 14px;
165         font-style: italic;
166         padding-top: 5px;
167         margin-top: 3em;
168         margin-bottom: 1em;
169 }
170
171 /* Links layout */
172
173 a {
174         text-decoration: none;
175         color: #428BCA;
176         background: transparent;
177 }
178 a:hover, a:focus {
179         color: #2A6496;
180         text-decoration: underline;
181 }
182 a:focus {
183         outline: thin dotted #333;
184         outline: 5px auto -webkit-focus-ring-color;
185         outline-offset: -2px;
186 }
187 a:hover, a:active {
188         outline: 0;
189 }
190
191 h1 a:link, h1 a:visited, h2 a:link, h2 a:visited,
192 h3 a:link, h3 a:visited, h4 a:link, h4 a:visited,
193 h5 a:link, h5 a:visited {color: black;}
194 h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
195 h5 a:hover {text-decoration: none;}
196
197 /* Code */
198
199 pre, code {
200         font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
201         word-wrap: break-word;
202 }
203 pre {
204         border-left: 2px solid #eee;
205         white-space: pre-wrap;
206         padding: 14px;
207         padding-right: 0;
208         margin: 20px 0;
209         font-size: 15px;
210         word-break: break-all;
211 }
212 code {
213         padding: 0 2px;
214         color: #8D1A38;
215 }
216 pre code {
217         padding: 0;
218         font-size: inherit;
219         color: inherit;
220 }
221
222 a > code {
223         color: #428BCA;
224 }
225
226 .section-header > a > code {
227         color: #8D1A38;
228 }
229
230 /* Code highlighting */
231 pre.rust .kw { color: #8959A8; }
232 pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
233 pre.rust .number, pre.rust .string { color: #718C00; }
234 pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val,
235 pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
236 pre.rust .comment { color: #8E908C; }
237 pre.rust .doccomment { color: #4D4D4C; }
238 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
239 pre.rust .lifetime { color: #B76514; }
240
241 /* The rest */
242
243 #versioninfo {
244         text-align: center;
245         margin: 0.5em;
246         font-size: 1.1em;
247 }
248 @media (min-width: 992px) {
249         #versioninfo {
250                 font-size: 0.8em;
251                 position: fixed;
252                 bottom: 0px;
253                 right: 0px;
254         }
255         .white-sticker {
256                 background-color: #fff;
257                 margin: 2px;
258                 padding: 0 2px;
259                 border-radius: .2em;
260         }
261 }
262 #versioninfo a.hash {
263         color: gray;
264         font-size: 80%;
265 }
266
267 blockquote {
268         color: #000;
269         margin: 20px 0;
270         padding: 15px 20px;
271         background-color: #f2f7f9;
272         border-top: .1em solid #e5eef2;
273         border-bottom: .1em solid #e5eef2;
274 }
275 blockquote p {
276         font-size: 17px;
277         font-weight: 300;
278         line-height: 1.4;
279 }
280 blockquote p:last-child {
281         margin-bottom: 0;
282 }
283
284 ul, ol {
285         padding-left: 25px;
286 }
287 ul ul, ol ul, ul ol, ol ol {
288         margin-bottom: 0;
289 }
290 dl {
291         margin-bottom: 20px;
292 }
293 dd {
294         margin-left: 0;
295 }
296
297 nav ul {
298         list-style-type: none;
299         margin: 0;
300         padding-left: 0px;
301 }
302
303 /* Only display one level of hierarchy in the TOC */
304 nav ul ul {
305         display: none;
306 }
307
308 sub,
309 sup {
310         font-size: 75%;
311         line-height: 0;
312         position: relative;
313 }
314
315 hr {
316         margin-top: 20px;
317         margin-bottom: 20px;
318         border: 0;
319         border-top: 1px solid #eeeeee;
320 }
321
322 table {
323         border-collapse: collapse;
324         border-spacing: 0;
325         overflow-x: auto;
326         display: block;
327 }
328
329 table tr.odd {
330         background: #eee;
331 }
332
333 table td,
334 table th {
335         border: 1px solid #ddd;
336         padding: 5px;
337 }
338
339 /* Code snippets */
340
341 pre.rust { position: relative; }
342 a.test-arrow {
343         background-color: rgba(78, 139, 202, 0.2);
344         display: inline-block;
345         position: absolute;
346         color: #f5f5f5;
347         padding: 5px 10px 5px 10px;
348         border-radius: 5px;
349         font-size: 130%;
350         top: 5px;
351         right: 5px;
352 }
353 a.test-arrow:hover{
354         background-color: #4e8bca;
355         text-decoration: none;
356 }
357
358 .unstable-feature {
359         border: 2px solid red;
360         padding: 5px;
361 }
362
363 @media (min-width: 1170px) {
364         pre {
365                 font-size: 15px;
366         }
367 }
368
369 @media print {
370         * {
371                 text-shadow: none !important;
372                 color: #000 !important;
373                 background: transparent !important;
374                 box-shadow: none !important;
375         }
376         a, a:visited {
377                 text-decoration: underline;
378         }
379         p a[href]:after {
380                 content: " (" attr(href) ")";
381         }
382         footer a[href]:after {
383                 content: "";
384         }
385         a[href^="javascript:"]:after, a[href^="#"]:after {
386                 content: "";
387         }
388         pre, blockquote {
389                 border: 1px solid #999;
390                 page-break-inside: avoid;
391         }
392         @page {
393                 margin: 2cm .5cm;
394         }
395         h1:not(.title), h2, h3 {
396                 border-bottom: 0px none;
397         }
398         p, h2, h3 {
399                 orphans: 3;
400                 widows: 3;
401         }
402         h2, h3 {
403                 page-break-after: avoid;
404         }
405         table {
406                 border-collapse: collapse !important;
407         }
408         table td, table th {
409                 background-color: #fff !important;
410         }
411 }
412
413 #keyword-table-marker + table thead { display: none; }
414 #keyword-table-marker + table td { border: none; }
415 #keyword-table-marker + table {
416         margin-left: 2em;
417         margin-bottom: 1em;
418 }
419
420 .error-described {
421         position: relative;
422 }
423
424 .information {
425         position: absolute;
426         left: -25px;
427         margin-top: 7px;
428         z-index: 1;
429 }
430
431 .tooltip {
432         position: relative;
433         display: inline-block;
434         cursor: pointer;
435 }
436
437 .tooltip .tooltiptext {
438         width: 120px;
439         display: none;
440         text-align: center;
441         padding: 5px 3px;
442         border-radius: 6px;
443         margin-left: 5px;
444         top: -5px;
445         left: 105%;
446         z-index: 1;
447 }
448
449 .tooltip:hover .tooltiptext {
450         display: inline;
451 }
452
453 .tooltip .tooltiptext::after {
454         content: " ";
455         position: absolute;
456         top: 50%;
457         left: 13px;
458         margin-top: -5px;
459         border-width: 5px;
460         border-style: solid;
461 }