-
Notifications
You must be signed in to change notification settings - Fork 5
/
print.css
463 lines (376 loc) · 11.8 KB
/
print.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
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
459
460
461
462
463
/* Based on the Sample style sheet for boom!, the book microformat by Hakon Wium Lie and Bert Bos, November 2005 */
/* You may reuse this style sheet for any purpose without any fees */
html {
margin: 0;
font: 10pt/1.26 "Gill Sans", sans-serif;
line-height: 107%;
font-weight: lighter;
}
body {
margin: 0 7%;
font: 10pt/1.26 "Gill Sans", sans-serif;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Gill sans", "Futura", serif;
margin: 1em 0 0.5em 0;
page-break-after: avoid;
font-weight: lighter;
}
h1 {
padding: 2em 0 1.5em 0;
margin: 0;
font-size: 2em;
line-height:1.1em;
font-weight: 900;
}
h2 {
font-size: 1.2em;
font-weight: bold;
}
h1 {
string-set: header content();
page-break-after: never;
}
h3 {
font-size: 1em;
font-weight: bold;
}
span.caps {
font-variant: small-caps;
}
span.author {display: block;font-style: italic;}
span.source {display: block; font-style: italic;}
p.originally {margin: 20px; font-style: italic;}
p.originally > a {max-width: 400px;}
q::before {
content: "\201C";
}
q::after {
content: "\201D";
}
p {margin: 0.4em 0; }
p + p { text-indent: 1em;}
p.sidenote + p, p.caption, p.art { text-indent: 0 }
br {
margin:0 0 1em 0;
display:block;
}
p.author {
margin-top: 2em;
text-indent: 0;
text-align: right;
}
p.commons {
margin-top: 2em;
}
#toc > p {margin: 0.2em 0 0 0;}
ul.understanding {
margin: 2em 0 0 0;
}
pre { margin: 1em 1.3em; }
a { text-decoration: none; color: black }
img {margin: 10px; max-width: 400px;}
/*clear*/
.clear {clear:both;line-height:0px;font-size:0px;height:0px;padding:0px;margin:0px;border:none;}
/* Clearfix */
.clearfix:after {visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0;}
* html .clearfix {zoom:1;}
/* IE6 */
*:first-child+html .clearfix {zoom:1;}
/* IE7 */
.clr {overflow:hidden;/*method for clearing floats*/}
.imprint p.commons {font-weight:bold;}
.imprint ul.license-properties {margin:1em 0 0 0;padding:0;}
.imprint ul.license-properties ul {margin:0.5em 0;}
.imprint ul.license-properties li {
list-style-type:none;
font-size:9pt;
margin:0 0 0.5em 0;
}
@page {
margin: 27mm 16mm 27mm 16mm;
size: 6in 9in !important;
@footnotes {
border-top: thin solid black;
padding-top: 0.3em;
margin-top: 0.6em;
margin-left: 7%;
}
}
div {max-width:400px !important;}
/* define default page and names pages: cover, blank, frontmatter */
@page :left {
@top-left {
font: 8pt "Gill Sans", serif;
content: string(header, first); font-style:italic;
vertical-align: bottom;
padding-bottom: 2em;
}
@bottom-left {
font: 8pt "Gill Sans", serif;
content: counter(page);
padding-top: 2em;
vertical-align: top;
}
}
@page :right {
@top-right {
font: 8pt "Gill Sans", serif;
font-style:italic;
content: string(header, first);
vertical-align: bottom;
padding-bottom: 2em;
}
@bottom-right {
font: 8pt "Gill Sans", serif;
content: counter(page);
text-align: right;
vertical-align: top;
padding-top: 2em;
}
}
@page frontmatter :left {
@top-left {
font: 8pt "Gill Sans", serif;
font-style:italic;
content: string(title);
vertical-align: bottom;
padding-bottom: 2em;
}
@bottom-left {
font: 8pt "Gill Sans", serif;
content: counter(page, lower-roman);
padding-top: 2em;
vertical-align: top;
}
}
@page cover { margin: 0; }
@page backcover { margin: 0; }
@page frontmatter :right {
@top-right {
font: 8pt "Gill Sans", serif;
font-style:italic;
content: string(header, first);
vertical-align: bottom;
padding-bottom: 2em;
}
@bottom-right {
font: 8pt "Gill Sans", serif;
font-style:italic;
content: counter(page, lower-roman);
text-align: right;
vertical-align: top;
padding-top: 2em;
}
}
@page blank :left {
@top-left { content: normal }
@bottom-left { content: normal }
}
@page blank :right {
@top-right { content: normal }
@bottom-right { content: normal }
}
/* footnotes */
.footnote {
display: none; /* default rule */
display: prince-footnote; /* prince-specific rules */
position: footnote;
footnote-style-position: inside;
counter-increment: footnote;
margin-left: 1.4em;
font-size: 90%;
line-height: 1.4;
}
.footnote::footnote-call {
vertical-align: super;
font-size: 80%;
}
.footnote::footnote-marker {
vertical-align: super;
color: green;
padding-right: 0.4em;
}
/*
A book consists of different types of sections. We propose to use
DIV elements with these class names:
frontcover
halftitlepage: contains the title of the book
titlepage: contains the title of the book, name of author(s) and publisher
imprint: left page with copyright, publisher, library printing information
dedication: right page with short dedication
foreword: written by someone other than the author(s)
toc: table of contents
preface: preface, including acknowledgements
chapter: each chapter is given its own DIV element
references: contains list of references
appendix: each appendix is given its own
bibliography
glossary
index
colophon: describes how the book was produced
backcover
A book will use several of the types listed above, but few books
will use all of them.
*/
/* which section uses which named page */
div.halftitlepage, div.titlepage, div.imprint, div.dedication, div.blank { page: blank }
div.foreword, div#toc, div.preface { page: frontmatter }
/* page breaks */
div.frontcover, div.halftitlepage, div.titlepage, div.backcover { page-break-before: right }
div.imprint, div.blank { page-break-before: always }
div.dedication, div.foreword, div.preface, div.chapter, div.reference,
div.appendix, div.bibliography, div.glossary, div.index, div.colophon {
page-break-before: always
}
div.backcover { page-break-before: left }
/* the front cover; this code is probably not very reusable by other books */
div.frontcover { page: cover; }
div.frontcover img {
position: absolute;
width: 6in; height: 9in;
left: 0; top: 0;
z-index: -1;
}
div.frontcover h1 {
position: absolute;
left: 2cm; top: 1cm;
color: white;
font-size: 44pt;
font-weight: normal;
}
div.frontcover h2 {
position: absolute;
left: 2cm; top: 5cm;
color: white;
font-size: 16pt;
font-weight: normal;
padding: 0;
letter-spacing: 0.15em;
}
div.frontcover h3 {
position: absolute;
left: 2cm; top: 7cm;
color: white;
font-size: 24pt;
font-weight: normal;
}
div.frontcover p {
position: absolute;
left: 2cm; bottom: 1.5cm;
font-size: 24pt;
color: black;
font-weight: bold;
text-transform: uppercase;
}
div.backcover { page: backcover; }
div.backcover img {
position: absolute;
width: 6in; height: 9in;
left: 0; top: 0;
z-index: -1;
}
/* titlepage, halftitlepage */
div.titlepage h1, div.halftitlepage h1 { margin-bottom: 2em; }
div.titlepage h2, div.halftitlepage h2 { font-size: 1.2em; margin-bottom: 3em; }
div.titlepage h3, div.halftitlepage h3 { font-size: 1em; margin-bottom: 3em; }
div.titlepage p, div.halftitlepage p {
font-size: 1.4em;
font-weight: bold;
margin: 0; padding: 0;
}
/* TOC */
#toc {
margin:0;
padding:0;
list-style-type: none;
}
#toc ul {
margin: 0 0 0 1em;
padding: 0;
font-weight: normal;
}
#toc > li {
font-weight: bold;
margin-bottom: 0;
}
#toc a {margin:0;}
#toc a::after {
content: leader('.') target-counter(attr(href), page);
font-style: normal;
}
#toc > li.frontmatter a::after {
content: leader('.') target-counter(attr(href), page, lower-roman);
font-style: normal;
}
#toc > li.endmatter a::after {
content: leader('.') target-counter(attr(href), page);
font-style: normal;
}
#toc > li::before, #toc > .c17::before {
content: "Chapter " counter(toc-chapter, decimal);
display: block;
margin: 1.5em 0 0.1em 0cm;
font-weight: normal;
counter-increment: toc-chapter;
page-break-after: avoid;
font-size: 1.2em;
}
/* chapter numbers */
div.chapter, .section-header { counter-increment: chapter; }
/*images*/
div.chapter img {display:block;/*border:0.25cm solid #333333;*/max-width:4in;clear:both;margin:0.5in auto;}
/*exceptions*/
.commenter-profile img, .commenter-profile, img.bug {dispaly:none;}
table {border: none;}
div {border: 0.01cm solid #FFFFFF;}
td {border: none; }
.heading1::before,h1::before {
white-space: pre;
margin-left: 0;
font-size: 50%;
content: " \A"; /* ornaments */
}
.heading1::before, div.chapter h1::before { content: "Chapter " counter(chapter) " \A"; }
div.frontcover h1::before, div.titlepage h1::before, div.halftitlepage h1::before {
content: normal; /* that is, none */
}
.heading1, h1 { string-set: header content();}
.heading1, div.chapter h1 { string-set: header "Chapter " counter(chapter) ": " content(); }
/* index */
ul.index {
list-style-type: none;
margin: 0; padding: 0;
column-count: 2;
column-gap: 1em;
}
ul.index a::after { content: ", " target-counter(attr(href), page); }
ul.index li a {font-size:1em;}
@media screen, handheld {
html { margin: 1em; font: 14px "Gill Sans", sans-serif; }
span.logo {position:absolute;top:5em;font-weight:bold;}
h1 { margin-bottom: 0.5em; padding-bottom:0; }
#content {width:750px;}
p {padding:1em 0 1.5em 0;}
p + p { text-indent: 0 }
div.frontcover, div.halftitlepage, div.titlepage, div.imprint,
div.dedication, div.foreword, div#toc, div.index { display: none }
#feedurl {width:500px;padding:10px;}
.button{display:inline-block;zoom:1;/* zoom and *display = ie7 hack for display:inline-block */
*display:inline;vertical-align:baseline;border:0;margin:20px 0 30px 0;outline:none;cursor:pointer;text-align:center;text-decoration:none;font:14px/100% Arial,Helvetica,sans-serif;padding:.5em 2em .55em;/*change to adjust size of button*/
text-shadow:0 1px 1px rgba(0,0,0,.3);-webkit-border-radius:.5em;-moz-border-radius:.5em;border-radius:.5em;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2);}
.button:hover{text-decoration:none;}
.button:active{position:relative;top:1px;}
a.button, a:link.button {color:#fff;}
/* black */
.black{color:#d7d7d7;border:solid 1px #333;background:#333;background:-webkit-gradient(linear,left top,left bottom,from(#666),to(#000));background:-moz-linear-gradient(top,#666,#000);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#666666',endColorstr='#000000');}
.black:hover{background:#000;background:-webkit-gradient(linear,left top,left bottom,from(#444),to(#000));background:-moz-linear-gradient(top,#444,#000);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#444444',endColorstr='#000000');}
.black:active{color:#666;background:-webkit-gradient(linear,left top,left bottom,from(#000),to(#444));background:-moz-linear-gradient(top,#000,#444);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000',endColorstr='#666666');}
/* blue */
.blue{color:#d9eef7;border:solid 1px #0076a3;background:#0095cd;background:-webkit-gradient(linear,left top,left bottom,from(#00adee),to(#0078a5));background:-moz-linear-gradient(top,#00adee,#0078a5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee',endColorstr='#0078a5');}
.blue:hover{background:#007ead;background:-webkit-gradient(linear,left top,left bottom,from(#0095cc),to(#00678e));background:-moz-linear-gradient(top,#0095cc,#00678e);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0095cc',endColorstr='#00678e');}
.blue:active{color:#80bed6;background:-webkit-gradient(linear,left top,left bottom,from(#0078a5),to(#00adee));background:-moz-linear-gradient(top,#0078a5,#00adee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0078a5',endColorstr='#00adee');}
}
/*TOC */
#toc a::after { content: leader(".") target-counter(attr(href), page); }
h1{ page-break-before: always }