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 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 44 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
@media (min-width: 1170px) {
A
Adrien Tétar 已提交
82 83 84 85
    h1 {
        margin-top: 40px;
        margin-bottom: 30px;
    }
86 87 88 89 90
    h1, h2, h3 {
        margin-top: 30px;
        margin-bottom: 15px;
    }
}
A
Adrien Tétar 已提交
91
h4, h5, h6 {
92 93
    margin-top: 12px;
    margin-bottom: 10px;
94 95 96
    padding: 5px 10px;
}
h5, h6 {
97
    text-decoration: underline;
98 99
}

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

140 141 142 143 144 145
nav {
    column-count: 2;
    -moz-column-count: 2;
    -webkit-column-count: 2;
    font-size: 15px;
}
A
Adrien Tétar 已提交
146
p {
147
    margin: 0 0 1em 0;
148 149
}

A
Adrien Tétar 已提交
150 151 152 153 154 155 156 157
strong {
    font-weight: bold;
}

em {
    font-style: italic;
}

158 159
footer {
    border-top: 1px solid #ddd;
160
    font-size: 14.3px;
161
    font-style: italic;
162 163
    padding-top: 5px;
    margin-top: 3em;
164 165 166
    margin-bottom: 1em;
}

A
Adrien Tétar 已提交
167 168
/* Links layout */

A
Adrien Tétar 已提交
169
a {
170 171 172
    text-decoration: none;
    color: #428BCA;
    background: transparent;
A
Adrien Tétar 已提交
173 174
}
a:hover, a:focus {
175 176
    color: #2A6496;
    text-decoration: underline;
A
Adrien Tétar 已提交
177 178
}
a:focus {
179 180 181
    outline: thin dotted #333;
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: -2px;
A
Adrien Tétar 已提交
182 183
}
a:hover, a:active {
184
    outline: 0;
185
}
186 187

h1 a:link, h1 a:visited, h2 a:link, h2 a:visited,
A
Adrien Tétar 已提交
188 189
h3 a:link, h3 a:visited, h4 a:link, h4 a:visited,
h5 a:link, h5 a:visited {color: black;}
A
Adrien Tétar 已提交
190 191
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
h5 a:hover {text-decoration: none;}
A
Adrien Tétar 已提交
192

A
Adrien Tétar 已提交
193 194
/* Code */

A
Adrien Tétar 已提交
195
pre, code {
A
Adrien Tétar 已提交
196
    font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
A
Adrien Tétar 已提交
197 198
}
pre {
A
Adrien Tétar 已提交
199 200
    border-left: 2px solid #eee;
    border-radius: 0;
201
    white-space: pre-wrap;
A
Adrien Tétar 已提交
202 203
    padding: 14px;
    padding-right: 0;
204
    margin: 20px 0;
205 206 207
    font-size: 13px;
    word-break: break-all;
    word-wrap: break-word;
A
Adrien Tétar 已提交
208 209
}
code {
210 211
    padding: 0 2px;
    color: #8D1A38;
212
    white-space: nowrap;
A
Adrien Tétar 已提交
213 214
}
pre code {
215 216 217 218 219
    padding: 0;
    font-size: inherit;
    color: inherit;
    white-space: pre-wrap;
    background-color: transparent;
A
Adrien Tétar 已提交
220
}
221 222

/* Code highlighting */
223 224
pre.rust .kw { color: #8959A8; }
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
A
Adrien Tétar 已提交
225 226 227
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; }
228 229
pre.rust .comment { color: #8E908C; }
pre.rust .doccomment { color: #4D4D4C; }
A
Adrien Tétar 已提交
230 231 232
pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
pre.rust .lifetime { color: #B76514; }

A
Adrien Tétar 已提交
233
/* The rest */
K
Kevin Cantu 已提交
234

235
#versioninfo {
236 237 238
    text-align: center;
    margin: 0.5em;
    font-size: 1.1em;
A
Adrien Tétar 已提交
239
}
A
Adrien Tétar 已提交
240
@media (min-width: 768px) {
241
    #versioninfo {
A
Adrien Tétar 已提交
242
        font-size: 0.8em;
243 244 245 246 247 248 249 250 251 252
        position: fixed;
        bottom: 0px;
        right: 0px;
    }
    .white-sticker {
        background-color: #fff;
        margin: 2px;
        padding: 0 2px;
        border-radius: .3em;
    }
A
Adrien Tétar 已提交
253
}
A
Adrien Tétar 已提交
254
#versioninfo a.hash {
255
    color: gray;
256
    font-size: 80%;
257 258
}

259
blockquote {
A
Adrien Tétar 已提交
260 261 262 263 264 265
    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 已提交
266 267
}
blockquote p {
268 269
    font-size: 17px;
    font-weight: 300;
A
Adrien Tétar 已提交
270
    line-height: 1.4;
A
Adrien Tétar 已提交
271 272
}
blockquote p:last-child {
273
    margin-bottom: 0;
274
}
275

A
Adrien Tétar 已提交
276 277
ul, ol {
    padding-left: 25px;
A
Adrien Tétar 已提交
278
}
A
Adrien Tétar 已提交
279
ul ul, ol ul, ul ol, ol ol {
280
    margin-bottom: 0;
A
Adrien Tétar 已提交
281 282
}
dl {
283
    margin-bottom: 20px;
A
Adrien Tétar 已提交
284 285
}
dd {
286
    margin-left: 0;
287
}
B
Brian Anderson 已提交
288

289
nav ul {
290
    list-style-type: none;
A
Adrien Tétar 已提交
291
    margin: 0;
292
    padding-left: 0px;
293
}
294

295
/* Only display one level of hierarchy in the TOC */
296
nav ul ul {
297 298
    display: none;
}
299

A
Adrien Tétar 已提交
300 301
sub,
sup {
302 303 304
    font-size: 75%;
    line-height: 0;
    position: relative;
305
}
A
Adrien Tétar 已提交
306 307

hr {
308 309 310 311
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eeeeee;
A
Adrien Tétar 已提交
312 313
}

314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
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 已提交
329 330 331 332 333 334
@media (min-width: 1170px) {
    pre {
        font-size: 15px;
    }
}

A
Adrien Tétar 已提交
335
@media print {
336 337 338 339 340 341 342 343 344
    * {
        text-shadow: none !important;
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    a, a:visited {
        text-decoration: underline;
    }
A
Adrien Tétar 已提交
345
    p a[href]:after {
346 347
        content: " (" attr(href) ")";
    }
A
Adrien Tétar 已提交
348 349 350
    footer a[href]:after {
        content: "";
    }
351 352 353 354 355 356 357 358 359 360
    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 已提交
361 362 363
    h1:not(.title), h2, h3 {
        border-bottom: 0px none;
    }
364 365 366 367 368 369 370 371 372 373 374 375 376
    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;
    }
377
}