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