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