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