rust.css 6.9 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 26 27 28
}
@font-face {
    font-family: 'Heuristica';
    font-style: normal;
    font-weight: 400;
29
    src: local('Heuristica Regular'), url("Heuristica-Regular.woff") format('woff');
30 31 32 33 34
}
@font-face {
    font-family: 'Heuristica';
    font-style: italic;
    font-weight: 400;
35
    src: local('Heuristica Italic'), url("Heuristica-Italic.woff") format('woff');
36 37 38 39 40
}
@font-face {
    font-family: 'Heuristica';
    font-style: normal;
    font-weight: 700;
41
    src: local('Heuristica Bold'), url("Heuristica-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: "Heuristica", "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 135
nav {
    column-count: 2;
    -moz-column-count: 2;
    -webkit-column-count: 2;
    font-size: 15px;
}
A
Adrien Tétar 已提交
136
p {
137
    margin: 0 0 1em 0;
138 139
}

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

em {
    font-style: italic;
}

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

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

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

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

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

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

/* Code highlighting */
210 211
pre.rust .kw { color: #8959A8; }
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
A
Adrien Tétar 已提交
212 213 214
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; }
215 216
pre.rust .comment { color: #8E908C; }
pre.rust .doccomment { color: #4D4D4C; }
A
Adrien Tétar 已提交
217 218 219
pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
pre.rust .lifetime { color: #B76514; }

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

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

246
blockquote {
A
Adrien Tétar 已提交
247 248 249 250 251 252
    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 已提交
253 254
}
blockquote p {
255 256
    font-size: 17px;
    font-weight: 300;
A
Adrien Tétar 已提交
257
    line-height: 1.4;
A
Adrien Tétar 已提交
258 259
}
blockquote p:last-child {
260
    margin-bottom: 0;
261
}
262

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

276
nav ul {
277
    list-style-type: none;
A
Adrien Tétar 已提交
278
    margin: 0;
279
    padding-left: 0px;
280
}
281

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

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

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

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

table tr.odd {
    background: #eee;
}

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

A
Adrien Tétar 已提交
316 317 318 319 320 321
@media (min-width: 1170px) {
    pre {
        font-size: 15px;
    }
}

A
Adrien Tétar 已提交
322
@media print {
323 324 325 326 327 328 329 330 331
    * {
        text-shadow: none !important;
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    a, a:visited {
        text-decoration: underline;
    }
A
Adrien Tétar 已提交
332
    p a[href]:after {
333 334
        content: " (" attr(href) ")";
    }
A
Adrien Tétar 已提交
335 336 337
    footer a[href]:after {
        content: "";
    }
338 339 340 341 342 343 344 345 346 347
    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 已提交
348 349 350
    h1:not(.title), h2, h3 {
        border-bottom: 0px none;
    }
351 352 353 354 355 356 357 358 359 360 361 362 363
    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;
    }
364
}