]> git.proxmox.com Git - rustc.git/blob - src/doc/rust.css
cd158283180a268381a35370837bd968f7753ed8
[rustc.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 background-color: white;
60 margin: 0 auto;
61 padding: 0 15px;
62 font-family: "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
63 font-size: 18px;
64 color: #333;
65 line-height: 1.428571429;
66
67 -webkit-font-feature-settings: "kern", "liga";
68 -moz-font-feature-settings: "kern", "liga";
69 font-feature-settings: "kern", "liga";
70 }
71 @media (min-width: 768px) {
72 body {
73 max-width: 750px;
74 }
75 }
76
77 h1, h2, h3, h4, h5, h6, nav, #versioninfo {
78 font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
79 }
80 h1, h2, h3, h4, h5, h6 {
81 color: black;
82 font-weight: 400;
83 line-height: 1.1;
84 }
85 h1, h2, h3 {
86 margin-top: 20px;
87 margin-bottom: 15px;
88 }
89 h1 {
90 margin-bottom: 20px;
91 }
92 h4, h5, h6 {
93 margin-top: 12px;
94 margin-bottom: 10px;
95 padding: 5px 10px;
96 }
97 h5, h6 {
98 text-decoration: underline;
99 }
100
101 h1 {
102 font-size: 28px;
103 font-weight: 500;
104 padding: .1em .4em;
105 border-bottom: 2px solid #ddd;
106 }
107 h1.title {
108 line-height: 1.5em;
109 }
110 h2 {
111 font-size: 26px;
112 padding: .2em .5em;
113 border-bottom: 1px solid #ddd;
114 }
115 h3 {
116 font-size: 24px;
117 padding: .2em .7em;
118 border-bottom: 1px solid #DDE8FC;
119 }
120 h4 {
121 font-size: 22px;
122 }
123 h5 {
124 font-size: 20px;
125 }
126 h6 {
127 font-size: 18px;
128 }
129 @media (min-width: 992px) {
130 h1 {
131 font-size: 36px;
132 }
133 h2 {
134 font-size: 30px;
135 }
136 h3 {
137 font-size: 26px;
138 }
139 }
140
141 nav {
142 column-count: 2;
143 -moz-column-count: 2;
144 -webkit-column-count: 2;
145 font-size: 15px;
146 margin: 0 0 1em 0;
147 }
148 p {
149 margin: 0 0 1em 0;
150 }
151
152 strong {
153 font-weight: bold;
154 }
155
156 em {
157 font-style: italic;
158 }
159
160 footer {
161 border-top: 1px solid #ddd;
162 font-size: 14.3px;
163 font-style: italic;
164 padding-top: 5px;
165 margin-top: 3em;
166 margin-bottom: 1em;
167 }
168
169 /* Links layout */
170
171 a {
172 text-decoration: none;
173 color: #428BCA;
174 background: transparent;
175 }
176 a:hover, a:focus {
177 color: #2A6496;
178 text-decoration: underline;
179 }
180 a:focus {
181 outline: thin dotted #333;
182 outline: 5px auto -webkit-focus-ring-color;
183 outline-offset: -2px;
184 }
185 a:hover, a:active {
186 outline: 0;
187 }
188
189 h1 a:link, h1 a:visited, h2 a:link, h2 a:visited,
190 h3 a:link, h3 a:visited, h4 a:link, h4 a:visited,
191 h5 a:link, h5 a:visited {color: black;}
192 h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
193 h5 a:hover {text-decoration: none;}
194
195 /* Code */
196
197 pre, code {
198 font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
199 word-wrap: break-word;
200 }
201 pre {
202 border-left: 2px solid #eee;
203 white-space: pre-wrap;
204 padding: 14px;
205 padding-right: 0;
206 margin: 20px 0;
207 font-size: 13px;
208 word-break: break-all;
209 }
210 code {
211 padding: 0 2px;
212 color: #8D1A38;
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 overflow-x: auto;
320 display: block;
321 }
322
323 table tr.odd {
324 background: #eee;
325 }
326
327 table td,
328 table th {
329 border: 1px solid #ddd;
330 padding: 5px;
331 }
332
333 /* Code snippets */
334
335 .rusttest { display: none; }
336 pre.rust { position: relative; }
337 .test-arrow {
338 display: inline-block;
339 position: absolute;
340 top: 0;
341 right: 10px;
342 font-size: 150%;
343 -webkit-transform: scaleX(-1);
344 transform: scaleX(-1);
345 }
346
347 .unstable-feature {
348 border: 2px solid red;
349 padding: 5px;
350 }
351
352 @media (min-width: 1170px) {
353 pre {
354 font-size: 15px;
355 }
356 }
357
358 @media print {
359 * {
360 text-shadow: none !important;
361 color: #000 !important;
362 background: transparent !important;
363 box-shadow: none !important;
364 }
365 a, a:visited {
366 text-decoration: underline;
367 }
368 p a[href]:after {
369 content: " (" attr(href) ")";
370 }
371 footer a[href]:after {
372 content: "";
373 }
374 a[href^="javascript:"]:after, a[href^="#"]:after {
375 content: "";
376 }
377 pre, blockquote {
378 border: 1px solid #999;
379 page-break-inside: avoid;
380 }
381 @page {
382 margin: 2cm .5cm;
383 }
384 h1:not(.title), h2, h3 {
385 border-bottom: 0px none;
386 }
387 p, h2, h3 {
388 orphans: 3;
389 widows: 3;
390 }
391 h2, h3 {
392 page-break-after: avoid;
393 }
394 table {
395 border-collapse: collapse !important;
396 }
397 table td, table th {
398 background-color: #fff !important;
399 }
400 }
401
402 #keyword-table-marker + table thead { display: none; }
403 #keyword-table-marker + table td { border: none; }
404 #keyword-table-marker + table {
405 margin-left: 2em;
406 margin-bottom: 1em;
407 }