main.css 9.3 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
pre,code { margin: 1.5em 0; overflow: auto; color: #222;}
27
pre,code {
28 29 30 31
    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
#mainCol a code, #subCol a code, #feature a code {color: #980905;}
160 161 162 163 164


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

346 347 348 349 350 351 352 353
#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;
}

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

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

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

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

397 398 399 400 401 402 403
#mainCol div.todo {
	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;
}

404
.note code, .info code, .todo code {border:none; background: none; padding: 0;}
405

406 407
#mainCol ul li {
	list-style:none;
408
	background: url(../images/grey_bullet.gif) no-repeat left 0.5em;
409 410
	padding-left: 1em;
	margin-left: 0;
411
}
412

413 414 415
#subCol .content {
	font-size: 0.7857em;
	line-height: 1.5em;
416 417
}

418 419 420 421 422
#subCol .content li {
	font-weight: normal;
	background: none;
	padding: 0 0 1em;
	font-size: 1.1667em;
423
}
424

425 426 427 428
/* Clearing
--------------------------------------- */

.clearfix:after {
429 430 431 432
    content: ".";
    display: block;
    height: 0;
    clear: both;
433 434 435
    visibility: hidden;
}

436 437 438
.clearfix {display: inline-block;}
* html .clearfix {height: 1%;}
.clearfix {display: block;}
439 440 441 442 443 444 445 446 447 448 449
.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 {
450
    margin-bottom: 1em;
451
}
452 453 454 455 456 457 458 459 460 461 462

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

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