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

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

10 11
.left {float: left; margin-right: 1em;}
.right {float: right; margin-left: 1em;}
12 13 14
@media screen and (max-width: 480px) {
  .left, .right { float: none; }
}
15 16 17
.small {font-size: smaller;}
.large {font-size: larger;}
.hide {display: none;}
18

19
ul, ol { margin: 0 1.5em 1.5em 1.5em; }
20

21 22
ul { list-style-type: disc; }
ol { list-style-type: decimal; }
23

24 25 26
dl { margin: 0 0 1.5em 0; }
dl dt { font-weight: bold; }
dd { margin-left: 1.5em;}
27

28 29 30 31 32 33 34
pre, code {
  font-size: 1em;
  font-family: "Anonymous Pro", "Inconsolata", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
  line-height: 1.5;
  margin: 1.5em 0;
  overflow: auto;
  color: #222;
35
}
36

37
p code, ul code {
38 39 40 41 42
  background: #eee;
  border-radius: 2px;
  padding: 1px 3px;
}

43
pre, tt, code {
44 45 46 47 48 49
 white-space: pre-wrap;       /* css-3 */
 white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
 white-space: -pre-wrap;      /* Opera 4-6 */
 white-space: -o-pre-wrap;    /* Opera 7 */
 word-wrap: break-word;       /* Internet Explorer 5.5+ */
}
50

51 52 53
abbr, acronym { border-bottom: 1px dotted #666; }
address { margin: 0 0 1.5em; font-style: italic; }
del { color:#666; }
54

55 56 57 58 59 60
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;}
61

62 63 64
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; }
65

66 67 68 69
input.text, input.title,
textarea, select {
  margin:0.5em 0;
  border:1px solid #bbb;
70 71 72
}

table {
73 74 75 76
  margin: 0 0 1.5em;
  border: 2px solid #CCC;
  background: #FFF;
  border-collapse: collapse;
77
}
78

79
table th, table td {
Y
Yoshiyuki Hirano 已提交
80
  padding: 9px 10px;
81 82
  border: 1px solid #CCC;
  border-collapse: collapse;
83
}
84

85
table th {
86 87 88
  border-bottom: 2px solid #CCC;
  background: #EEE;
  font-weight: bold;
89
}
90

G
Gosha Arinich 已提交
91 92 93 94
img {
  max-width: 100%;
}

95 96 97 98 99

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

body {
100 101 102 103 104 105
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 87.5%;
  line-height: 1.5em;
  background: #fff;
  color: #999;
106
}
107 108

.wrapper {
109 110 111
  text-align: left;
  margin: 0 auto;
  max-width: 960px;
112
  padding: 0 1em;
113
}
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136

.red-button {
  display: inline-block;
  border-top: 1px solid rgba(255,255,255,.5);
  background: #751913;
  background: -webkit-gradient(linear, left top, left bottom, from(#c52f24), to(#751913));
  background: -webkit-linear-gradient(top, #c52f24, #751913);
  background: -moz-linear-gradient(top, #c52f24, #751913);
  background: -ms-linear-gradient(top, #c52f24, #751913);
  background: -o-linear-gradient(top, #c52f24, #751913);
  padding: 9px 18px;
  -webkit-border-radius: 11px;
  -moz-border-radius: 11px;
  border-radius: 11px;
  -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
  -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
  box-shadow: rgba(0,0,0,1) 0 1px 0;
  text-shadow: rgba(0,0,0,.4) 0 1px 0;
  color: white;
  font-size: 15px;
  font-family: Helvetica, Arial, Sans-Serif;
  text-decoration: none;
  vertical-align: middle;
137
  cursor: pointer;
138 139 140 141 142 143 144 145 146 147
}
.red-button:active {
  border-top: none;
  padding-top: 10px;
  background: -webkit-gradient(linear, left top, left bottom, from(#751913), to(#c52f24));
  background: -webkit-linear-gradient(top, #751913, #c52f24);
  background: -moz-linear-gradient(top, #751913, #c52f24);
  background: -ms-linear-gradient(top, #751913, #c52f24);
  background: -o-linear-gradient(top, #751913, #c52f24);
}
148 149

#topNav {
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
  padding: 1em 0;
  color: #565656;
  background: #222;
}

.s-hidden {
  display: none;
}

@media screen and (min-width: 1025px) {
  .more-info-button {
    display: none;
  }
  .more-info-links {
    list-style: none;
    display: inline;
    margin: 0;
  }

  .more-info {
    display: inline-block;
  }
  .more-info:after {
    content: " |";
  }

  .more-info:last-child:after {
    content: "";
  }
}

@media screen and (max-width: 1024px) {
  #topNav .wrapper { text-align: center; }
  .more-info-button {
    position: relative;
    z-index: 25;
  }

  .more-info-label {
    display: none;
  }

  .more-info-container {
    position: absolute;
    top: .5em;
    z-index: 20;
    margin: 0 auto;
    left: 0;
    right: 0;
    width: 20em;
  }

  .more-info-links {
    display: block;
    list-style: none;
    background-color: #c52f24;
    border-radius: 5px;
    padding-top: 5.25em;
    border: 1px #980905 solid;
  }
  .more-info-links.s-hidden {
    display: none;
  }
  .more-info {
    padding: .75em;
    border-top: 1px #980905 solid;
  }
  .more-info a, .more-info a:link, .more-info a:visited {
    display: block;
    color: white;
    width: 100%;
    height: 100%;
    text-decoration: none;
    text-transform: uppercase;
  }
225 226 227
}

#header {
228 229 230 231
  background: #c52f24 url(../images/header_tile.gif) repeat-x;
  color: #FFF;
  padding: 1.5em 0;
  z-index: 99;
232
}
233 234

#feature {
235 236 237
  background: #d5e9f6 url(../images/feature_tile.gif) repeat-x;
  color: #333;
  padding: 0.5em 0 1.5em;
238 239 240
}

#container {
241 242
  color: #333;
  padding: 0.5em 0 1.5em 0;
243
}
244 245

#mainCol {
246 247
  max-width: 630px;
  margin-left: 2em;
248
}
249 250

#subCol {
251 252
  position: absolute;
  z-index: 0;
253
  top: 21px;
254 255 256 257 258 259
  right: 0;
  background: #FFF;
  padding: 1em 1.5em 1em 1.25em;
  width: 17em;
  font-size: 0.9285em;
  line-height: 1.3846em;
260
  margin-right: 1em;
261
}
262 263 264 265 266 267 268 269 270


@media screen and (max-width: 800px) {
  #subCol {
    position: static;
    width: inherit;
    margin-left: -1em;
    margin-right: 0;
    padding-right: 1.25em;
271
  }
272
}
273

274
#footer {
275 276
  padding: 2em 0;
  background: #222 url(../images/footer_tile.gif) repeat-x;
277
}
278
#footer .wrapper {
279 280
  padding-left: 1em;
  max-width: 960px;
281 282
}

283 284 285
#header .wrapper, #topNav .wrapper, #feature .wrapper {padding-left: 1em; max-width: 960px;}
#feature .wrapper {max-width: 640px; padding-right: 23em; position: relative; z-index: 0;}

286 287 288 289
@media screen and (max-width: 960px) {
  #container .wrapper { padding-right: 23em; }
}

290
@media screen and (max-width: 800px) {
291
  #feature .wrapper, #container .wrapper { padding-right: 0; }
292
}
293 294 295 296 297

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

a, a:link, a:visited {
298 299
  color: #ee3f3f;
  text-decoration: underline;
300
}
301

302
#mainCol a, #subCol a, #feature a {color: #980905;}
303
#mainCol a code, #subCol a code, #feature a code {color: #980905;}
304

305 306
#mainCol a.anchorlink, #mainCol a.anchorlink code {color: #333;}
#mainCol a.anchorlink { text-decoration: none; }
R
Ruy Diaz 已提交
307 308
#mainCol a.anchorlink:hover { text-decoration: underline; }

309 310 311
/* Navigation
--------------------------------------- */

312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394
.nav {
  margin: 0;
  padding: 0;
  list-style: none;
  float: right;
  margin-top: 1.5em;
  font-size: 1.2857em;
}

.nav .nav-item {color: #FFF; text-decoration: none;}
.nav .nav-item:hover {text-decoration: underline;}

.guides-index-large, .guides-index-small .guides-index-item {
  padding: 0.5em 1.5em;
  border-radius: 1em;
  -webkit-border-radius: 1em;
  -moz-border-radius: 1em;
  background: #980905;
  position: relative;
  color: white;
}

.guides-index .guides-index-item {
  background: #980905 url(../images/nav_arrow.gif) no-repeat right top;
  padding-right: 1em;
  position: relative;
  z-index: 15;
  padding-bottom: 0.125em;
}

.guides-index:hover .guides-index-item, .guides-index .guides-index-item:hover {
  background-position: right -81px;
  text-decoration: underline !important;
}

@media screen and (min-width: 481px) {
  .nav {
    float: right;
    margin-top: 1.5em;
    font-size: 1.2857em;
  }
  .nav>li {
    display: inline;
    margin-left: 0.5em;
  }
  .guides-index.guides-index-small {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  .nav {
    float: none;
    width: 100%;
    text-align: center;
  }
  .nav .nav-item {
    display: block;
    margin: 0;
    width: 100%;
    background-color: #980905;
    border: solid 1px #620c04;
    border-top: 0;
    padding: 15px 0;
    text-align: center;
  }
  .nav .nav-item, .nav-item.guides-index-item {
    text-transform: uppercase;
  }
  .nav .nav-item:first-child, .nav-item.guides-index-small {
    border-top: solid 1px #620c04;
  }
  .guides-index.guides-index-small {
    display: block;
    margin-top: 1.5em;
  }
  .guides-index.guides-index-large {
    display: none;
  }
  .guides-index-small .guides-index-item {
    font: inherit;
    padding-left: .75em;
    font-size: .95em;
395
    background-position: 96% 16px;
396
    -webkit-appearance: none;
397
  }
398 399 400
  .guides-index-small .guides-index-item:hover{
    background-position: 96% -65px;
  }
401 402 403
}

#guides {
404
  width: 37em;
405 406 407 408 409 410 411 412 413 414
  display: block;
  background: #980905;
  border-radius: 1em;
  color: #f1938c;
  padding: 1.5em 2em;
  position: absolute;
  z-index: 10;
  top: -0.25em;
  right: 0;
  padding-top: 2em;
415 416
}

417 418 419 420
#guides.visible {
  display: block !important;
}

421
.guides-section dt, .guides-section dd {
422 423 424 425
  font-weight: normal;
  font-size: 0.722em;
  margin: 0;
  padding: 0;
426
}
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458
.guides-section dt {
  margin: 0.5em 0 0;
  padding:0;
}
#guides a {
  background: none !important;
  color: #FFF;
  text-decoration: none;
}
#guides a:hover {
  text-decoration: underline;
}
.guides-section-container {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  width: 100%;
  max-height: 35em;
}

.guides-section {
  min-width: 5em;
  margin: 0 2em 0.5em 0;
  flex: auto;
  max-width: 12em;
}

.guides-section dd {
  line-height: 1.3;
  margin-bottom: 0.5em;
}

459
#guides hr {
460 461 462 463 464
  display: block;
  border: none;
  height: 1px;
  color: #f1938c;
  background: #f1938c;
465 466 467 468 469 470
}

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

h1 {
471 472 473 474
  font-size: 2.5em;
  line-height: 1em;
  margin: 0.6em 0 .2em;
  font-weight: bold;
475
}
476 477

h2 {
478 479 480 481
  font-size: 2.1428em;
  line-height: 1em;
  margin: 0.7em 0 .2333em;
  font-weight: bold;
482
}
483

484 485 486 487 488 489
@media screen and (max-width: 480px) {
  h2 {
    font-size: 1.45em;
  }
}

490
h3 {
491 492 493 494
  font-size: 1.7142em;
  line-height: 1.286em;
  margin: 0.875em 0 0.2916em;
  font-weight: bold;
495
}
496

497 498 499 500 501 502
@media screen and (max-width: 480px) {
  h3 {
    font-size: 1.45em;
  }
}

503
h4 {
504 505 506 507
  font-size: 1.2857em;
  line-height: 1.2em;
  margin: 1.6667em 0 .3887em;
  font-weight: bold;
508
}
509 510

h5 {
511 512 513 514
  font-size: 1em;
  line-height: 1.5em;
  margin: 1em 0 .5em;
  font-weight: bold;
515 516
}

517
h6 {
518 519 520 521
  font-size: 1em;
  line-height: 1.5em;
  margin: 1em 0 .5em;
  font-weight: normal;
522
}
523 524

.section {
525 526
  padding-bottom: 0.25em;
  border-bottom: 1px solid #999;
527
}
528 529 530 531 532

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

.pic {
533
  margin: 0 2em 2em 0;
534 535
}

536 537
#topNav strong {color: #999; margin-right: 0.5em;}
#topNav strong a {color: #FFF;}
538 539

#header h1 {
540
  float: left;
O
Olivier Lacan 已提交
541
  background: url(../images/rails_guides_logo_1x.png) no-repeat;
542 543 544 545 546 547
  width: 297px;
  text-indent: -9999em;
  margin: 0;
  padding: 0;
}

O
Olivier Lacan 已提交
548 549 550 551 552 553 554 555 556 557 558 559 560
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (   min--moz-device-pixel-ratio: 2),
only screen and (     -o-min-device-pixel-ratio: 2/1),
only screen and (        min-device-pixel-ratio: 2),
only screen and (                min-resolution: 192dpi),
only screen and (                min-resolution: 2dppx) {
  #header h1 {
    background: url(../images/rails_guides_logo_2x.png) no-repeat;
    background-size: 160%;
  }
}

561 562 563 564
@media screen and (max-width: 480px) {
  #header h1 {
    float: none;
  }
565 566 567
}

#header h1 a {
568 569 570
  text-decoration: none;
  display: block;
  height: 77px;
571 572 573
}

#feature p {
574 575
  font-size: 1.2857em;
  margin-bottom: 0.75em;
576 577
}

578 579 580 581 582 583
@media screen and (max-width: 480px) {
  #feature p {
    font-size: 1em;
  }
}

584
#feature ul {margin-left: 0;}
585
#feature ul li {
586 587 588 589 590
  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;
591 592 593
}

#mainCol dd, #subCol dd {
594 595 596 597 598 599
  padding: 0.25em 0 1em;
  border-bottom: 1px solid #CCC;
  margin-bottom: 1em;
  margin-left: 0;
  /*padding-left: 28px;*/
  padding-left: 0;
600 601 602
}

#mainCol dt, #subCol dt {
603
  font-size: 1.2857em;
604 605
  padding: 0.125em 0 0.25em 0;
  margin-bottom: 0;
606 607
}

608 609 610 611 612 613
@media screen and (max-width: 480px) {
  #mainCol dt, #subCol dt {
    font-size: 1em;
  }
}

614
#mainCol dd.work-in-progress, #subCol dd.work-in-progress {
615 616 617 618 619
  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;
620 621
}

622
#mainCol dd.kindle, #subCol dd.kindle {
623 624 625 626 627
  background: #d5e9f6 url(../images/tab_info.gif) no-repeat left top;
  border: none;
  padding: 1.25em 1em 1.25em 48px;
  margin-left: 0;
  margin-top: 0.25em;
628 629
}

630
#mainCol div.warning, #subCol dd.warning {
631 632
  background: #f9d9d8 url(../images/tab_red.gif) no-repeat left top;
  border: none;
633
  padding: 1.25em 1.25em 0.25em 48px;
634 635
  margin-left: 0;
  margin-top: 0.25em;
636 637 638 639 640 641 642 643 644
}

#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;}
645
#subCol .chapters ul li {
646 647 648 649 650 651
  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;
X
Xavier Noria 已提交
652
}
653

654 655
#subCol li ul, li ol { margin:0 1.5em; }

656
div.code_container {
657 658
  background: #EEE url(../images/tab_grey.gif) no-repeat left top;
  padding: 0.25em 1em 0.5em 48px;
659 660
}

661
.note {
662 663 664 665
  background: #fff9d8 url(../images/tab_note.gif) no-repeat left top;
  border: none;
  padding: 1em 1em 0.25em 48px;
  margin: 0.25em 0 1.5em 0;
666 667 668
}

.info {
669 670 671 672
  background: #d5e9f6 url(../images/tab_info.gif) no-repeat left top;
  border: none;
  padding: 1em 1em 0.25em 48px;
  margin: 0.25em 0 1.5em 0;
673 674
}

675
#mainCol div.todo {
676 677 678 679
  background: #fff9d8 url(../images/tab_yellow.gif) no-repeat left top;
  border: none;
  padding: 1em 1em 0.25em 48px;
  margin: 0.25em 0 1.5em 0;
680 681
}

682 683 684
.note code, .info code, .todo code {
  background: #fff;
}
685

686
#mainCol ul li {
687 688 689 690
  list-style:none;
  background: url(../images/grey_bullet.gif) no-repeat left 0.5em;
  padding-left: 1em;
  margin-left: 0;
691
}
692

693
#subCol .content {
694 695
  font-size: 0.7857em;
  line-height: 1.5em;
696 697
}

698
#subCol .content li {
699 700 701 702
  font-weight: normal;
  background: none;
  padding: 0 0 1em;
  font-size: 1.1667em;
703
}
704

705 706 707 708
/* Clearing
--------------------------------------- */

.clearfix:after {
709 710 711 712 713
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
714 715
}

716 717
* html .clearfix {height: 1%;}
.clearfix {display: block;}
718 719 720 721

/* Same bottom margin for special boxes than for regular paragraphs, this way
intermediate whitespace looks uniform. */
div.code_container, div.important, div.caution, div.warning, div.note, div.info {
722
  margin-bottom: 1.5em;
723 724 725 726 727
}

/* Remove bottom margin of paragraphs in special boxes, otherwise they get a
spurious blank area below with the box background. */
div.important p, div.caution p, div.warning p, div.note p, div.info p {
728
  margin-bottom: 1em;
729
}
730 731 732 733 734 735 736 737 738 739 740

/* Edge Badge
--------------------------------------- */

#edge-badge {
  position: fixed;
  right: 0px;
  top: 0px;
  z-index: 100;
  border: none;
}
741 742 743 744 745 746

/* Foundation v2.1.4 http://foundation.zurb.com */
/* Artfully masterminded by ZURB  */

/* Mobile */
@media only screen and (max-width: 767px) {
747 748 749 750 751 752 753 754 755 756 757 758 759 760
  table.responsive { margin-bottom: 0; }

  .pinned { position: absolute; left: 0; top: 0; background: #fff; width: 35%; overflow: hidden; overflow-x: scroll; border-right: 1px solid #ccc; border-left: 1px solid #ccc; }
  .pinned table { border-right: none; border-left: none; width: 100%; }
  .pinned table th, .pinned table td { white-space: nowrap; }
  .pinned td:last-child { border-bottom: 0; }

  div.table-wrapper { position: relative; margin-bottom: 20px; overflow: hidden; border-right: 1px solid #ccc; }
  div.table-wrapper div.scrollable table { margin-left: 35%; }
  div.table-wrapper div.scrollable { overflow: scroll; overflow-y: hidden; }

  table.responsive td, table.responsive th { position: relative; white-space: nowrap; overflow: hidden; }
  table.responsive th:first-child, table.responsive td:first-child, table.responsive td:first-child, table.responsive.pinned td { display: none; }

761
}