main.css 9.1 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 12 13 14
.left {float: left; margin-right: 1em;}
.right {float: right; margin-left: 1em;}
.small {font-size: smaller;}
.large {font-size: larger;}
.hide {display: none;}
15

16 17
li ul, li ol { margin:0 1.5em; }
ul, ol { margin: 0 1.5em 1.5em 1.5em; }
18

19 20
ul { list-style-type: disc; }
ol { list-style-type: decimal; }
21

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

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

33 34 35
abbr, acronym { border-bottom: 1px dotted #666; }
address { margin: 0 0 1.5em; font-style: italic; }
del { color:#666; }
36

37 38 39 40 41 42
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;}
43

44 45 46
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; }
47

48 49 50 51
input.text, input.title,
textarea, select {
  margin:0.5em 0;
  border:1px solid #bbb;
52 53 54
}

table {
55 56 57 58
	margin: 0 0 1.5em;
	border: 2px solid #CCC;
	background: #FFF;
	border-collapse: collapse;
59
}
60

61
table th, table td {
62 63 64
	padding: 0.25em 1em;
	border: 1px solid #CCC;
	border-collapse: collapse;
65
}
66

67
table th {
68 69 70 71
	border-bottom: 2px solid #CCC;
	background: #EEE;
	font-weight: bold;
	padding: 0.5em 1em;
72
}
73 74 75 76 77 78


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

body {
79 80 81 82
	text-align: center;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 87.5%;
	line-height: 1.5em;
83
	background: #fff;
84
	min-width: 69em;
85 86
	color: #999;
	}
87 88

.wrapper {
89 90 91 92
	text-align: left;
	margin: 0 auto;
	width: 69em;
	}
93 94

#topNav {
95 96
	padding: 1em 0;
	color: #565656;
97
	background: #222;
98 99 100
}

#header {
101
	background: #c52f24 url(../images/header_tile.gif) repeat-x;
102 103 104 105 106
	color: #FFF;
	padding: 1.5em 0;
	position: relative;
	z-index: 99;
	}
107 108

#feature {
109
	background: #d5e9f6 url(../images/feature_tile.gif) repeat-x;
110 111
	color: #333;
	padding: 0.5em 0 1.5em;
112 113 114
}

#container {
115 116 117
	color: #333;
	padding: 0.5em 0 1.5em 0;
	}
118 119

#mainCol {
120 121
	width: 45em;
	margin-left: 2em;
122
	}
123 124

#subCol {
125 126 127 128 129 130 131 132 133 134
	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;
	}
135

136
#extraCol {display: none;}
137 138

#footer {
139
	padding: 2em 0;
140
	background: #222 url(../images/footer_tile.gif) repeat-x;
141
	}
142
#footer .wrapper {
143 144
	padding-left: 2em;
	width: 67em;
145 146
}

147 148
#header .wrapper, #topNav .wrapper, #feature .wrapper {padding-left: 1em; width: 68em;}
#feature .wrapper {width: 45em; padding-right: 23em; position: relative; z-index: 0;}
149 150 151 152 153

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

a, a:link, a:visited {
154 155 156
	color: #ee3f3f;
	text-decoration: underline;
	}
157

158
#mainCol a, #subCol a, #feature a {color: #980905;}
159 160 161 162 163


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

164 165
.nav {margin: 0; padding: 0;}
.nav li {display: inline; list-style: none;}
166 167

#header .nav {
168 169 170
	float: right;
	margin-top: 1.5em;
	font-size: 1.2857em;
171 172
}

173 174 175
#header .nav li {margin: 0 0 0 0.5em;}
#header .nav a {color: #FFF; text-decoration: none;}
#header .nav a:hover {text-decoration: underline;}
176 177

#header .nav .index {
178 179 180 181 182 183
	padding: 0.5em 1.5em;
	border-radius: 1em;
	-webkit-border-radius: 1em;
	-moz-border-radius: 1em;
	background: #980905;
	position: relative;
184 185 186
}

#header .nav .index a {
187
	background: #980905 url(../images/nav_arrow.gif) no-repeat right top;
188
	padding-right: 1em;
189 190 191
	position: relative;
	z-index: 15;
	padding-bottom: 0.125em;
192
}
193
#header .nav .index:hover a, #header .nav .index a:hover {background-position: right -81px;}
194 195

#guides {
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
	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;
211 212 213
}

#guides dt, #guides dd {
214 215 216 217 218 219 220 221 222
	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;}
223
#guides hr {
224 225 226 227 228
	display: block;
	border: none;
	height: 1px;
	color: #f1938c;
	background: #f1938c;
229 230 231 232 233 234
}

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

h1 {
235 236 237 238 239
	font-size: 2.5em;
	line-height: 1em;
	margin: 0.6em 0 .2em;
	font-weight: bold;
	}
240 241

h2 {
242 243 244 245 246
	font-size: 2.1428em;
	line-height: 1em;
	margin: 0.7em 0 .2333em;
	font-weight: bold;
	}
247 248

h3 {
249 250 251 252 253
	font-size: 1.7142em;
	line-height: 1.286em;
	margin: 0.875em 0 0.2916em;
	font-weight: bold;
	}
254

255
h4 {
256 257 258 259 260
	font-size: 1.2857em;
	line-height: 1.2em;
	margin: 1.6667em 0 .3887em;
	font-weight: bold;
	}
261 262

h5 {
263 264 265 266
	font-size: 1em;
	line-height: 1.5em;
	margin: 1em 0 .5em;
	font-weight: bold;
267 268
}

269
h6 {
270 271 272 273 274 275 276 277 278
	font-size: 1em;
	line-height: 1.5em;
	margin: 1em 0 .5em;
	font-weight: normal;
	}

.section {
	padding-bottom: 0.25em;
	border-bottom: 1px solid #999;
279
}
280 281 282 283 284

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

.pic {
285
	margin: 0 2em 2em 0;
286 287
}

288 289
#topNav strong {color: #999; margin-right: 0.5em;}
#topNav strong a {color: #FFF;}
290 291

#header h1 {
292
	float: left;
293
	background: url(../images/rails_guides_logo.gif) no-repeat;
294 295 296 297
	width: 297px;
	text-indent: -9999em;
	margin: 0;
	padding: 0;
298 299 300
}

#header h1 a {
301 302 303
	text-decoration: none;
	display: block;
	height: 77px;
304 305 306
}

#feature p {
307 308
	font-size: 1.2857em;
	margin-bottom: 0.75em;
309 310
}

311
#feature ul {margin-left: 0;}
312
#feature ul li {
313
	list-style: none;
314
	background: url(../images/check_bullet.gif) no-repeat left 0.5em;
315 316 317
	padding: 0.5em 1.75em 0.5em 1.75em;
	font-size: 1.1428em;
	font-weight: bold;
318 319 320
}

#mainCol dd, #subCol dd {
321 322 323 324 325 326
	padding: 0.25em 0 1em;
	border-bottom: 1px solid #CCC;
	margin-bottom: 1em;
	margin-left: 0;
	/*padding-left: 28px;*/
	padding-left: 0;
327 328 329
}

#mainCol dt, #subCol dt {
330 331 332
	font-size: 1.2857em;
	padding: 0.125em 0 0.25em 0;
	margin-bottom: 0;
333
	/*background: url(../images/book_icon.gif) no-repeat left top;
334
	padding: 0.125em 0 0.25em 28px;*/
335 336
}

337
#mainCol dd.work-in-progress, #subCol dd.work-in-progress {
338
	background: #fff9d8 url(../images/tab_yellow.gif) no-repeat left top;
339 340 341 342
	border: none;
	padding: 1.25em 1em 1.25em 48px;
	margin-left: 0;
	margin-top: 0.25em;
343 344
}

345 346 347 348 349 350 351 352
#mainCol dd.kindle, #subCol dd.kindle {
	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;
}

353
#mainCol div.warning, #subCol dd.warning {
354
	background: #f9d9d8 url(../images/tab_red.gif) no-repeat left top;
355 356 357 358 359 360 361 362 363 364 365 366 367
	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;}
368
#subCol .chapters ul li {
369 370
	list-style: none;
	padding: 0 0 0 1em;
371
	background: url(../images/bullet.gif) no-repeat left 0.45em;
372 373 374
	margin-left: 0;
	font-size: 1em;
	font-weight: normal;
X
Xavier Noria 已提交
375
}
376

377
div.code_container {
378
	background: #EEE url(../images/tab_grey.gif) no-repeat left top;
379
	padding: 0.25em 1em 0.5em 48px;
380 381
}

382
.note {
383
	background: #fff9d8 url(../images/tab_note.gif) no-repeat left top;
384 385 386
	border: none;
	padding: 1em 1em 0.25em 48px;
	margin: 0.25em 0 1.5em 0;
387 388 389
}

.info {
390
	background: #d5e9f6 url(../images/tab_info.gif) no-repeat left top;
391 392 393
	border: none;
	padding: 1em 1em 0.25em 48px;
	margin: 0.25em 0 1.5em 0;
394 395
}

396
.note tt, .info tt {border:none; background: none; padding: 0;}
397

398 399
#mainCol ul li {
	list-style:none;
400
	background: url(../images/grey_bullet.gif) no-repeat left 0.5em;
401 402
	padding-left: 1em;
	margin-left: 0;
403
}
404

405 406 407
#subCol .content {
	font-size: 0.7857em;
	line-height: 1.5em;
408 409
}

410 411 412 413 414
#subCol .content li {
	font-weight: normal;
	background: none;
	padding: 0 0 1em;
	font-size: 1.1667em;
415
}
416

417 418 419 420
/* Clearing
--------------------------------------- */

.clearfix:after {
421 422 423 424
    content: ".";
    display: block;
    height: 0;
    clear: both;
425 426 427
    visibility: hidden;
}

428 429 430
.clearfix {display: inline-block;}
* html .clearfix {height: 1%;}
.clearfix {display: block;}
431 432 433 434 435 436 437 438 439 440 441
.clear { clear:both; }

/* 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 {
    margin-bottom: 1.5em;
}

/* 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 {
442
    margin-bottom: 1em;
443
}
444 445 446 447 448 449 450 451 452 453 454

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

#edge-badge {
  position: fixed;
  right: 0px;
  top: 0px;
  z-index: 100;
  border: none;
}