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