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