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