rust.css 7.2 KB
Newer Older
A
Adrien Tétar 已提交
1 2 3 4
/**
 * Copyright 2013 The Rust Project Developers. See the COPYRIGHT
 * file at the top-level directory of this distribution and at
 * http://rust-lang.org/COPYRIGHT.
5
 * With elements taken from Bootstrap v3.0.2 (MIT licensed).
A
Adrien Tétar 已提交
6 7 8 9 10 11 12
 *
 * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 * option. This file may not be copied, modified, or distributed
 * except according to those terms.
 */
13 14 15 16
@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 400;
17
    src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
18 19 20 21 22
}
@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 500;
23
    src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
24 25
}
@font-face {
A
Adrien Tétar 已提交
26
    font-family: 'Source Serif Pro';
27 28
    font-style: normal;
    font-weight: 400;
A
Adrien Tétar 已提交
29
    src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
30 31
}
@font-face {
A
Adrien Tétar 已提交
32
    font-family: 'Source Serif Pro';
33 34
    font-style: italic;
    font-weight: 400;
A
Adrien Tétar 已提交
35
    src: url("Heuristica-Italic.woff") format('woff');
36 37
}
@font-face {
A
Adrien Tétar 已提交
38
    font-family: 'Source Serif Pro';
39 40
    font-style: normal;
    font-weight: 700;
A
Adrien Tétar 已提交
41
    src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
42
}
A
Adrien Tétar 已提交
43

A
Adrien Tétar 已提交
44
*:not(body) {
A
Adrien Tétar 已提交
45 46 47 48 49 50 51
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

/* General structure */

52
body {
53 54
    margin: 0 auto;
    padding: 0 15px;
A
Adrien Tétar 已提交
55
    font-family: "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
56
    font-size: 18px;
57 58
    color: #333;
    line-height: 1.428571429;
59
}
A
Adrien Tétar 已提交
60
@media (min-width: 768px) {
61 62 63
    body {
        max-width: 750px;
    }
64 65
}

66 67 68
h1, h2, h3, h4, h5, h6, nav, #versioninfo {
    font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
A
Adrien Tétar 已提交
69
h1, h2, h3, h4, h5, h6 {
70
    color: black;
71
    font-weight: 400;
72
    line-height: 1.1;
73
}
A
Adrien Tétar 已提交
74
h1, h2, h3 {
75
    margin-top: 20px;
A
Adrien Tétar 已提交
76 77 78 79
    margin-bottom: 15px;
}
h1 {
    margin-bottom: 20px;
A
Adrien Tétar 已提交
80 81
}
h4, h5, h6 {
82 83
    margin-top: 12px;
    margin-bottom: 10px;
84 85 86
    padding: 5px 10px;
}
h5, h6 {
87
    text-decoration: underline;
88 89
}

A
Adrien Tétar 已提交
90
h1 {
91 92
    font-size: 28px;
    font-weight: 500;
93 94
    padding: .1em .4em;
    border-bottom: 2px solid #ddd;
A
Adrien Tétar 已提交
95 96
}
h1.title {
97
    line-height: 1.5em;
A
Adrien Tétar 已提交
98 99
}
h2 {
100
    font-size: 26px;
101 102
    padding: .2em .5em;
    border-bottom: 1px solid #ddd;
A
Adrien Tétar 已提交
103 104
}
h3 {
105 106 107
    font-size: 24px;
    padding: .2em .7em;
    border-bottom: 1px solid #DDE8FC;
A
Adrien Tétar 已提交
108
}
109
h4 {
110
    font-size: 22px;
111
}
A
Adrien Tétar 已提交
112
h5 {
113
    font-size: 20px;
B
Brian Anderson 已提交
114
}
A
Adrien Tétar 已提交
115
h6 {
116 117 118 119 120 121 122 123 124 125 126 127
    font-size: 18px;
}
@media (min-width: 992px) {
    h1 {
        font-size: 36px;
    }
    h2 {
        font-size: 30px;
    }
    h3 {
        font-size: 26px;
    }
128 129
}

130 131 132 133 134
nav {
    column-count: 2;
    -moz-column-count: 2;
    -webkit-column-count: 2;
    font-size: 15px;
135
    margin: 0 0 1em 0;
136
}
A
Adrien Tétar 已提交
137
p {
138
    margin: 0 0 1em 0;
139 140
}

A
Adrien Tétar 已提交
141 142 143 144 145 146 147 148
strong {
    font-weight: bold;
}

em {
    font-style: italic;
}

149 150
footer {
    border-top: 1px solid #ddd;
151
    font-size: 14.3px;
152
    font-style: italic;
153 154
    padding-top: 5px;
    margin-top: 3em;
155 156 157
    margin-bottom: 1em;
}

A
Adrien Tétar 已提交
158 159
/* Links layout */

A
Adrien Tétar 已提交
160
a {
161 162 163
    text-decoration: none;
    color: #428BCA;
    background: transparent;
A
Adrien Tétar 已提交
164 165
}
a:hover, a:focus {
166 167
    color: #2A6496;
    text-decoration: underline;
A
Adrien Tétar 已提交
168 169
}
a:focus {
170 171 172
    outline: thin dotted #333;
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: -2px;
A
Adrien Tétar 已提交
173 174
}
a:hover, a:active {
175
    outline: 0;
176
}
177 178

h1 a:link, h1 a:visited, h2 a:link, h2 a:visited,
A
Adrien Tétar 已提交
179 180
h3 a:link, h3 a:visited, h4 a:link, h4 a:visited,
h5 a:link, h5 a:visited {color: black;}
A
Adrien Tétar 已提交
181 182
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
h5 a:hover {text-decoration: none;}
A
Adrien Tétar 已提交
183

A
Adrien Tétar 已提交
184 185
/* Code */

A
Adrien Tétar 已提交
186
pre, code {
A
Adrien Tétar 已提交
187
    font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
A
Adrien Tétar 已提交
188 189
}
pre {
A
Adrien Tétar 已提交
190
    border-left: 2px solid #eee;
191
    white-space: pre-wrap;
A
Adrien Tétar 已提交
192 193
    padding: 14px;
    padding-right: 0;
194
    margin: 20px 0;
195 196 197
    font-size: 13px;
    word-break: break-all;
    word-wrap: break-word;
A
Adrien Tétar 已提交
198 199
}
code {
200 201
    padding: 0 2px;
    color: #8D1A38;
A
Adrien Tétar 已提交
202
    white-space: pre-wrap;
A
Adrien Tétar 已提交
203 204
}
pre code {
205 206 207
    padding: 0;
    font-size: inherit;
    color: inherit;
A
Adrien Tétar 已提交
208
}
209 210

/* Code highlighting */
211 212
pre.rust .kw { color: #8959A8; }
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
A
Adrien Tétar 已提交
213 214 215
pre.rust .number, pre.rust .string { color: #718C00; }
pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
216 217
pre.rust .comment { color: #8E908C; }
pre.rust .doccomment { color: #4D4D4C; }
A
Adrien Tétar 已提交
218 219 220
pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
pre.rust .lifetime { color: #B76514; }

A
Adrien Tétar 已提交
221
/* The rest */
K
Kevin Cantu 已提交
222

223
#versioninfo {
224 225 226
    text-align: center;
    margin: 0.5em;
    font-size: 1.1em;
A
Adrien Tétar 已提交
227
}
A
Adrien Tétar 已提交
228
@media (min-width: 992px) {
229
    #versioninfo {
A
Adrien Tétar 已提交
230
        font-size: 0.8em;
231 232 233 234 235 236 237 238
        position: fixed;
        bottom: 0px;
        right: 0px;
    }
    .white-sticker {
        background-color: #fff;
        margin: 2px;
        padding: 0 2px;
A
Adrien Tétar 已提交
239
        border-radius: .2em;
240
    }
A
Adrien Tétar 已提交
241
}
A
Adrien Tétar 已提交
242
#versioninfo a.hash {
243
    color: gray;
244
    font-size: 80%;
245 246
}

247
blockquote {
A
Adrien Tétar 已提交
248 249 250 251 252 253
    color: #000;
    margin: 20px 0;
    padding: 15px 20px;
    background-color: #f2f7f9;
    border-top: .1em solid #e5eef2;
    border-bottom: .1em solid #e5eef2;
A
Adrien Tétar 已提交
254 255
}
blockquote p {
256 257
    font-size: 17px;
    font-weight: 300;
A
Adrien Tétar 已提交
258
    line-height: 1.4;
A
Adrien Tétar 已提交
259 260
}
blockquote p:last-child {
261
    margin-bottom: 0;
262
}
263

A
Adrien Tétar 已提交
264 265
ul, ol {
    padding-left: 25px;
A
Adrien Tétar 已提交
266
}
A
Adrien Tétar 已提交
267
ul ul, ol ul, ul ol, ol ol {
268
    margin-bottom: 0;
A
Adrien Tétar 已提交
269 270
}
dl {
271
    margin-bottom: 20px;
A
Adrien Tétar 已提交
272 273
}
dd {
274
    margin-left: 0;
275
}
B
Brian Anderson 已提交
276

277
nav ul {
278
    list-style-type: none;
279
    margin: 0;
280
    padding-left: 0px;
281
}
282

283
/* Only display one level of hierarchy in the TOC */
284
nav ul ul {
285 286
    display: none;
}
287

A
Adrien Tétar 已提交
288 289
sub,
sup {
290 291 292
    font-size: 75%;
    line-height: 0;
    position: relative;
293
}
A
Adrien Tétar 已提交
294 295

hr {
296 297 298 299
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eeeeee;
A
Adrien Tétar 已提交
300 301
}

302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
table {
    border-collapse: collapse;
    border-spacing: 0;
}

table tr.odd {
    background: #eee;
}

table td,
table th {
    border: 1px solid #ddd;
    padding: 5px;
}

317 318 319 320 321 322 323 324 325 326 327 328 329
/* Code snippets */

.rusttest { display: none; }
pre.rust { position: relative; }
pre.rust a { transform: scaleX(-1); }
.test-arrow {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 10px;
    font-size: 150%;
}

A
Adrien Tétar 已提交
330 331 332 333 334 335
@media (min-width: 1170px) {
    pre {
        font-size: 15px;
    }
}

A
Adrien Tétar 已提交
336
@media print {
337 338 339 340 341 342 343 344 345
    * {
        text-shadow: none !important;
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    a, a:visited {
        text-decoration: underline;
    }
A
Adrien Tétar 已提交
346
    p a[href]:after {
347 348
        content: " (" attr(href) ")";
    }
A
Adrien Tétar 已提交
349 350 351
    footer a[href]:after {
        content: "";
    }
352 353 354 355 356 357 358 359 360 361
    a[href^="javascript:"]:after, a[href^="#"]:after {
        content: "";
    }
    pre, blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    @page {
        margin: 2cm .5cm;
    }
A
Adrien Tétar 已提交
362 363 364
    h1:not(.title), h2, h3 {
        border-bottom: 0px none;
    }
365 366 367 368 369 370 371 372 373 374 375 376 377
    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }
    h2, h3 {
        page-break-after: avoid;
    }
    table {
        border-collapse: collapse !important;
    }
    table td, table th {
        background-color: #fff !important;
    }
378
}