main.css 9.4 KB
Newer Older
1 2 3 4 5 6 7 8 9
/* Guides.rubyonrails.org */
/* Main.css */
/* Created January 30, 2009 */
/* Modified January 31, 2009
--------------------------------------- */

/* General
--------------------------------------- */

10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
.left {
    float: left;
    margin-right: 1em;
}
.right {
    float: right;
    margin-left: 1em;
}
.small {
    font-size: smaller;
}
.large {
    font-size: larger;
}
.hide {
    display: none;
}
27

28 29 30 31 32 33
li ul, li ol {
    margin: 0 1.5em;
}
ul, ol {
    margin: 0 1.5em 1.5em 1.5em;
}
34

35 36 37 38 39 40
ul {
    list-style-type: disc;
}
ol {
    list-style-type: decimal;
}
41

42 43 44 45 46 47 48 49 50
dl {
    margin: 0 0 1.5em 0;
}
dl dt {
    font-weight: bold;
}
dd {
    margin-left: 1.5em;
}
51

52 53 54 55 56 57 58 59
pre,code {
    margin: 1.5em 0;
    white-space: pre;
}
pre,code {
    font: 1em 'andale mono', 'lucida console', monospace;
    line-height: 1.5;
}
60

61 62 63 64 65 66 67 68 69 70
abbr, acronym {
    border-bottom: 1px dotted #666;
}
address {
    margin: 0 0 1.5em;
    font-style: italic;
}
del {
    color: #666;
}
71

72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
blockquote {
    margin: 1.5em;
    color: #666;
    font-style: italic;
}
strong {
    font-weight: bold;
}
em, dfn {
    font-style: italic;
}
dfn {
    font-weight: bold;
}
sup, sub {
    line-height: 0;
}
p {
    margin: 0 0 1.5em;
}
92

93 94 95 96 97 98 99 100 101 102 103 104
label {
    font-weight: bold;
}
fieldset {
    padding: 1.4em;
    margin: 0 0 1.5em 0;
    border: 1px solid #ccc;
}
legend {
    font-weight: bold;
    font-size: 1.2em;
}
105

106 107 108
input.text, input.title, textarea, select {
    margin: 0.5em 0em;
    border: 1px solid #bbb;
109 110 111
}

table {
112 113 114 115
    margin: 1em 0;
    border: 1px solid #ddd;
    background: #f4f4f4;
    border-spacing: 0;
116 117
}

118
table th, table td {
119 120 121
    padding: 0.25em;
    border-right: 1px dotted #e0e0e0;
    border-bottom: 1px dotted #e0e0e0;
122
}
123

124 125 126
table th:last-child, table td:last-child {
    border-right: none;
}
127

128
table th {
129 130 131
    border-bottom: 1px solid #ddd;
    background: #f0f0f0;
    font-weight: bold;
132
}
133

134
table tt {
135
    padding: 0.1em;
136
}
137 138 139 140 141 142


/* Structure and Layout
--------------------------------------- */

body {
143 144 145 146 147 148 149
    text-align: center;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 87.5%;
    line-height: 1.5em;
    background: #222;
    color: #999;
}
150 151

.wrapper {
152 153 154 155
    text-align: left;
    margin: 0 auto;
    width: 69em;
}
156 157

#topNav {
158 159
    padding: 1em 0;
    color: #565656;
160 161 162
}

#header {
163 164 165 166 167 168
    background: #c52f24 url(../../images/header_tile.gif) repeat-x;
    color: #FFF;
    padding: 1.5em 0;
    position: relative;
    z-index: 99;
}
169 170

#feature {
171 172 173
    background: #d5e9f6 url(../../images/feature_tile.gif) repeat-x;
    color: #333;
    padding: 0.5em 0 1.5em;
174 175 176
}

#container {
177 178 179 180
    background: #FFF;
    color: #333;
    padding: 0.5em 0 1.5em 0;
}
181 182

#mainCol {
183 184 185
    width: 45em;
    margin-left: 2em;
}
186 187

#subCol {
188 189 190 191 192 193 194 195 196 197 198 199 200 201
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    background: #FFF;
    padding: 1em 1.5em 1em 1.25em;
    width: 17em;
    font-size: 0.9285em;
    line-height: 1.3846em;
}

#extraCol {
    display: none;
}
202 203

#footer {
204 205 206
    padding: 2em 0;
    background: url(../../images/footer_tile.gif) repeat-x;
}
207
#footer .wrapper {
208 209
    padding-left: 2em;
    width: 67em;
210 211
}

212 213 214 215 216 217 218 219 220 221
#header .wrapper, #topNav .wrapper, #feature .wrapper {
    padding-left: 1em;
    width: 68em;
}
#feature .wrapper {
    width: 45em;
    padding-right: 23em;
    position: relative;
    z-index: 0;
}
222 223 224 225 226

/* Links
--------------------------------------- */

a, a:link, a:visited {
227 228 229
    color: #ee3f3f;
    text-decoration: underline;
}
230

231 232 233
#mainCol a, #subCol a {
    color: #980905;
}
234 235 236 237 238


/* Navigation
--------------------------------------- */

239 240 241 242 243 244 245 246
.nav {
    margin: 0;
    padding: 0;
}
.nav li {
    display: inline;
    list-style: none;
}
247 248

#header .nav {
249 250 251
    float: right;
    margin-top: 1.5em;
    font-size: 1.2857em;
252 253
}

254 255 256 257 258 259 260 261 262 263
#header .nav li {
    margin: 0 0 0 0.5em;
}
#header .nav a {
    color: #FFF;
    text-decoration: none;
}
#header .nav a:hover {
    text-decoration: underline;
}
264 265

#header .nav .index {
266 267 268 269 270 271
    padding: 0.5em 1.5em;
    border-radius: 1em;
    -webkit-border-radius: 1em;
    -moz-border-radius: 1em;
    background: #980905;
    position: relative;
272 273 274
}

#header .nav .index a {
275 276 277 278 279 280 281 282
    background: #980905 url(../../images/nav_arrow.gif) no-repeat right top;
    padding-right: 1em;
    position: relative;
    z-index: 15;
    padding-bottom: 0.125em;
}
#header .nav .index:hover a, #header .nav .index a:hover {
    background-position: right -81px;
283 284 285
}

#guides {
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
    width: 27em;
    display: block;
    background: #980905;
    border-radius: 1em;
    -webkit-border-radius: 1em;
    -moz-border-radius: 1em;
    -webkit-box-shadow: 0.25em 0.25em 1em rgba(0,0,0,0.25);
    -moz-box-shadow: rgba(0,0,0,0.25) 0.25em 0.25em 1em;
    color: #f1938c;
    padding: 1.5em 2em;
    position: absolute;
    z-index: 10;
    top: -0.25em;
    right: 0;
    padding-top: 2em;
301 302 303
}

#guides dt, #guides dd {
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
    font-weight: normal;
    font-size: 0.722em;
    margin: 0;
    padding: 0;
}
#guides dt {
    padding: 0;
    margin: 0.5em 0 0;
}
#guides a {
    color: #FFF;
    background: none !important;
}
#guides .L, #guides .R {
    float: left;
    width: 50%;
    margin: 0;
    padding: 0;
}
#guides .R {
    float: right;
}
326
#guides hr {
327 328 329 330 331
    display: block;
    border: none;
    height: 1px;
    color: #f1938c;
    background: #f1938c;
332 333 334 335 336 337
}

/* Headings
--------------------------------------- */

h1 {
338 339 340 341 342
    font-size: 2.5em;
    line-height: 1em;
    margin: 0.6em 0 .2em;
    font-weight: bold;
}
343 344

h2 {
345 346 347 348 349
    font-size: 2.1428em;
    line-height: 1em;
    margin: 0.7em 0 .2333em;
    font-weight: bold;
}
350 351

h3 {
352 353 354 355 356
    font-size: 1.7142em;
    line-height: 1.286em;
    margin: 0.875em 0 0.2916em;
    font-weight: bold;
}
357 358

h4 {
359 360 361 362 363
    font-size: 1.2857em;
    line-height: 1.2em;
    margin: 1.6667em 0 .3887em;
    font-weight: bold;
}
364 365

h5 {
366 367 368 369
    font-size: 1em;
    line-height: 1.5em;
    margin: 1em 0 .5em;
    font-weight: bold;
370 371 372
}

h6 {
373 374 375 376 377
    font-size: 1em;
    line-height: 1.5em;
    margin: 1em 0 .5em;
    font-weight: normal;
}
378 379 380 381 382

/* Content
--------------------------------------- */

.pic {
383
    margin: 0 2em 2em 0;
384 385
}

386 387 388 389 390 391 392
#topNav strong {
    color: #999;
    margin-right: 0.5em;
}
#topNav strong a {
    color: #FFF;
}
393 394

#header h1 {
395 396 397 398 399 400
    float: left;
    background: url(../../images/ruby_guides_logo.gif) no-repeat;
    width: 492px;
    text-indent: -9999em;
    margin: 0;
    padding: 0;
401 402 403
}

#header h1 a {
404 405 406
    text-decoration: none;
    display: block;
    height: 77px;
407 408 409
}

#feature p {
410 411
    font-size: 1.2857em;
    margin-bottom: 0.75em;
412 413
}

414 415 416
#feature ul {
    margin-left: 0;
}
417
#feature ul li {
418 419 420 421 422
    list-style: none;
    background: url(../../images/check_bullet.gif) no-repeat left 0.5em;
    padding: 0.5em 1.75em 0.5em 1.75em;
    font-size: 1.1428em;
    font-weight: bold;
423 424 425
}

#mainCol dd, #subCol dd {
426 427 428 429 430
    padding: 0.25em 0 1em;
    border-bottom: 1px solid #CCC;
    margin-bottom: 1em;
    margin-left: 0;
    padding-left: 28px;
431 432 433
}

#mainCol dt, #subCol dt {
434 435 436 437
    font-size: 1.2857em;
    padding: 0.125em 0 0.25em 28px;
    margin-bottom: 0;
    background: url(../../images/book_icon.gif) no-repeat left top;
438 439 440
}

#mainCol dd.ticket, #subCol dd.ticket {
441 442 443 444 445
    background: #fff9d8 url(../../images/tab_yellow.gif) no-repeat left top;
    border: none;
    padding: 1.25em 1em 1.25em 48px;
    margin-left: 0;
    margin-top: 0.25em;
446 447 448
}

#mainCol dd.warning, #subCol dd.warning {
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477
    background: #f9d9d8 url(../../images/tab_red.gif) no-repeat left top;
    border: none;
    padding: 1.25em 1.25em 1.25em 48px;
    margin-left: 0;
    margin-top: 0.25em;
}

#subCol .chapters {
    color: #980905;
}
#subCol .chapters a {
    font-weight: bold;
}
#subCol .chapters ul a {
    font-weight: normal;
}
#subCol .chapters li {
    margin-bottom: 0.75em;
}
#subCol h3.chapter {
    margin-top: 0.25em;
}
#subCol h3.chapter img {
    vertical-align: text-bottom;
}
#subCol .chapters ul {
    margin-left: 0;
    margin-top: 0.5em;
}
478
#subCol .chapters ul li {
479 480 481 482 483 484
    list-style: none;
    padding: 0 0 0 1em;
    background: url(../../images/bullet.gif) no-repeat left 0.45em;
    margin-left: 0;
    font-size: 1em;
    font-weight: normal;
485
}
X
Xavier Noria 已提交
486 487 488
#subCol .chapters p {
    font-size: 1em;    
}
489 490

tt {
491
    font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace;
492 493 494
}

code, pre {
495 496 497 498 499 500 501 502
    font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace;
    background: #EEE url(../../images/tab_grey.gif) no-repeat left top;
    border: none;
    padding: 0.25em 1em 0.5em 48px;
    margin-left: 0;
    margin-top: 0.25em;
    display: block;
    min-height: 45px;
503
    overflow: auto;
504 505 506
}

.note {
507 508 509 510 511
    background: #fff9d8 url(../../images/tab_note.gif) no-repeat left top;
    border: none;
    padding: 1em 1em 0.25em 48px;
    margin-left: 0;
    margin-top: 0.25em;
512 513 514
}

.info {
515 516 517 518 519
    background: #d5e9f6 url(../../images/tab_info.gif) no-repeat left top;
    border: none;
    padding: 1em 1em 0.25em 48px;
    margin-left: 0;
    margin-top: 0.25em;
520 521 522
}

.warning {
523 524 525 526 527
    background: #f9d9d8 url(../../images/tab_red.gif) no-repeat left top;
    border: none;
    padding: 1em 1em 0.25em 48px;
    margin-left: 0;
    margin-top: 0.25em;
528 529
}

530 531 532 533 534
.warning tt, .note tt, .info tt {
    border: none;
    background: none;
    padding: 0;
}
535 536

em.highlight {
537 538
    background: #fffcdb;
    padding: 0 0.25em;
539 540 541
}

#mainCol ul li {
542 543 544 545
    list-style: none;
    background: url(../../images/grey_bullet.gif) no-repeat left 0.5em;
    padding-left: 1em;
    margin-left: 0;
546 547 548 549 550 551 552 553 554 555 556 557 558
}

/* Clearing
--------------------------------------- */

.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

559 560 561 562 563 564 565 566 567 568 569 570
.clearfix {
    display: inline-block;
}
* html .clearfix {
    height: 1%;
}
.clearfix {
    display: block;
}
.clear {
    clear: both;
}