forked from diveintomark/diveintohtml5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screen.css
411 lines (360 loc) · 10.9 KB
/
screen.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
/*
"Dive Into HTML 5" stylesheet
Copyright (c) 2009, Mark Pilgrim, All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Classname Legend
.f = "fancy" = first paragraph of each chapter (gets a fancy drop-cap)
.c = "centered" = centered footer text (also clears floats)
.a = "asterism" = section break
.v = "navigation" = prev/next navigation links (not breadcrumbs)
.u = "Unicode" = text contains Unicode characters (requires special font declaration to accommodate *cough* a certain browser)
.p = "prompt" = command-line or interactive shell prompt within code listings
.dc = "drop cap" = image simulating first-letter initial
.pp = "pretty print" = apply syntax highlighting to this code block
.pf = "padded frame" = black border with internal padding
.fr = "framed" = black border, no padding
.ss = "screenshot" = image, floated right, with margin
.bc = "browser compat" = browser compatibility table (td cells all contain checks, Xs, and asterisks)
.st = "simple table" = table with 1px border in body font
.ho = "headers only" = on a table row, denotes that this row contains only table headers
.note = "note/caution/important" = indented block for tips/gotchas/language comparisons
.baa = "best available ampersand" = wrapper block for ampersands
.zebra = "zebra stripes" = off-white background color (used for "zebra stripe" tables)
How the fonts are compressed
Fonts are processed through http://www.fontsquirrel.com/fontface/generator to generate new TrueType, WOFF, and EOT Compressed versions.
Vertical Metrics are fixed, as is the GASP table, and kerning is removed. No X-height Matching is applied.
Essays 1742 has an em square value of 1024 and is stripped down to Lowercase, Uppercase, Numbers, and the following unicodes:
0021-002F,003A-003F,0040,005B-005F,007B-007D,2018-2019,201B-201D,201F,2022-2023,2026,2116,219C-219D,21B6-21B7,21DC-21DD,2212,261E,2767.
Linux Libertine has an em square value of 2048 and is stripped down to Lowercase, Uppercase, Numbers, and the following unicodes:
0021-002F,003A-003F,0040,005B-005F,007B-007D,2018-2019,201B-201D,201F,2022-2023,2026,2116,219C-219D,21B6-21B7,21DC-21DD,2212,261E,2767.
Acknowledgements & Inspirations
"The Elements of Typographic Style Applied to the Web" ... http://webtypography.net/toc/
"Use the Best Available Ampersand" ....................... http://simplebits.com/notebook/2008/08/14/ampersands.html
"Unicode Support in HTML, Fonts, and Web Browsers" ....... http://alanwood.net/unicode/
"Punctuation" ............................................ http://en.wikipedia.org/wiki/Punctuation
"Essays 1743" ............................................ http://www.thibault.org/fonts/essays/
"Libertine" .............................................. http://linuxlibertine.sourceforge.net/
"CSS Styled Restaurant Menu" ............................. http://www.web-graphics.com/mtarchive/ItalianMenu.html
*/
/* typography */
@font-face {
font-family: "Essays 1743";
src: url("f/Essays1743.eot?") format("eot"), url("f/Essays1743.woff") format("woff"), url("f/Essays1743.ttf") format("truetype");
}
@font-face {
font-family: "Essays 1743";
font-weight: bold;
src: url("f/Essays1743-bold.eot?") format("eot"), url("f/Essays1743-bold.woff") format("woff"), url("f/Essays1743-bold.ttf") format("truetype");
}
@font-face {
font-family: "Essays 1743";
font-style: italic;
src: url("f/Essays1743-italic.eot?") format("eot"), url("f/Essays1743-italic.woff") format("woff"), url("f/Essays1743-italic.ttf") format("truetype");
}
@font-face {
font-family: "Essays 1743";
font-style: italic;
font-weight: bold;
src: url("f/Essays1743-bold-italic.eot?") format("eot"), url("f/Essays1743-bold-italic.woff") format("woff"), url("f/Essays1743-bold-italic.ttf") format("truetype");
}
@font-face {
font-family: "Alphabet of Children";
src: url("f/Alphabet-of-Children.eot?") format("eot"), url("f/Alphabet-of-Children.woff") format("woff"), url("f/Alphabet-of-Children.ttf") format("truetype");
}
@font-face {
font-family: "Libertine";
src: url("f/Libertine.eot?") format("eot"), url("f/Libertine.woff") format("woff"), url("f/Libertine.ttf") format("truetype");
}
@font-face {
font-family: "Libertine";
font-weight: bold;
src: url("f/Libertine-bold.eot?") format("eot"), url("f/Libertine-bold.woff") format("woff"), url("f/Libertine-bold.ttf") format("truetype");
}
@font-face {
font-family: "Libertine";
font-style: italic;
src: url("f/Libertine-italic.eot?") format("eot"), url("f/Libertine-italic.woff") format("woff"), url("f/Libertine-italic.ttf") format("truetype");
}
@font-face {
font-family: "Libertine";
font-style: italic;
font-weight: bold;
src: url("f/Libertine-bold-italic.eot?") format("eot"), url("f/Libertine-bold-italic.woff") format("woff"), url("f/Libertine-bold-italic.ttf") format("truetype");
}
/* base */
html {
overflow-y: scroll;
-webkit-font-smoothing: antialiased;
}
html, body {
background: #fff;
color: #000;
margin: 0;
padding: 0;
}
body {
font: large/1.556 "Libertine", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
word-spacing: 0.1em;
max-width: 960px;
margin: 0 auto;
padding-bottom: 2em;
}
pre, kbd, samp, code, var {
font: medium/1.75 Consolas, "Andale Mono", Monaco, "Liberation Mono", "Bitstream Vera Sans Mono", "DejaVu Sans Mono", monospace;
word-spacing: 0;
letter-spacing: 0;
}
.a, .u, table.bc tbody td {
font: 100%/1 "Arial Unicode MS", FreeSerif, OpenSymbol, "DejaVu Sans", sans-serif;
}
.baa {
font: oblique 105% Constantia, Baskerville, Palatino, "Palatino Linotype", "URW Palladio L", serif;
}
.note {
margin: 3.112em 4.94em;
}
.note span {
display: block;
float: left;
font-size: 266.7%;
line-height: 0.8;
margin: 0 0.22em 0 -1.22em;
}
.ss span {
display: block;
text-align: center;
border-top: 3px double;
border-bottom: 3px double;
}
.c {
font-size: medium;
line-height: 1.75;
margin: 1.75em 0;
}
.f:first-letter {
font-family: "Alphabet of Children";
font-size: 8.2em;
float: left;
margin-right: 0.02em;
line-height: 0.75;
}
p, ul, ol {
font-size: large;
margin: 1.556em 0;
}
/* basics */
.clear {
clear: both;
}
.c, .a, #toc, form div {
clear: both;
text-align: center;
}
#toc ol, #toc li {
list-style: none;
margin-left: 0;
padding-left: 0;
}
.a {
font-size: xx-large;
line-height: .875;
text-shadow: 0 0 2px #667;
}
.pf, .fr {
border: 1px solid;
}
.pf {
margin: 1.75em 0;
}
.pf .inner {
min-height: 253px;
margin: 0 15px 0 0;
padding: 0 154px 1.75em 0;
background: white url(i/openclipart.org_johnny_automatic_little_professor.png) bottom right no-repeat;
}
.pf .moneybags {
min-height: 245px;
margin: 0 15px 0 0;
padding: 0 190px 1.75em 0;
background: white url(i/openclipart.org_johnny_automatic_bag_of_money.png) bottom right no-repeat;
}
.pf h4 {
margin: 0;
padding: 4px;
background: black;
color: white;
}
.ss {
float: right;
margin: 0 0 1.75em 1.75em;
font-size: medium;
}
address, cite, dfn, var {
font-style: normal;
}
sup {
font-variant: small-caps;
vertical-align: text-top;
}
/* links */
a {
text-decoration: none;
}
a:link {
color: FireBrick;
border-bottom: 1px dotted;
}
a:visited {
color: RosyBrown;
border-bottom: 1px dotted;
}
a:link:hover, a:visited:hover {
border-bottom: 1px solid;
}
.c a {
color: inherit;
}
/* figures and legends */
.legend {
font: italic x-large/1.75 "Essays 1743", "Marker Felt", "Kristen ITC", "Viner Hand ITC", "Lucida Handwriting", Amienne, Boopee, "Segoe Print", "Times New Roman", serif;
text-shadow: 0 0 1px #667;
margin-left: 0.5em;
vertical-align: top;
}
.arrow {
font-size: 200%;
line-height: 0.3;
vertical-align: sub;
}
.left {
float: left;
}
.right {
float: right;
}
.top {
margin-bottom: 0.3em;
display: block;
}
.bottom {
display: block;
margin-top: 0;
margin-left: 2em;
}
/* code blocks */
pre {
padding-left: 3.5em;
white-space: pre; /* CSS2 */
white-space: pre-wrap; /* CSS 2.1 */
word-wrap: break-word; /* IE */
}
pre.ib {
padding: 0;
}
mark {
display: inline-block;
background: #ff8;
border: 1px dotted #888;
}
.p {
color: #667;
}
/* overrides */
li ol, .q, .v span {
margin: 0;
}
code, var, samp {
line-height: inherit !important;
}
/* headers */
h1, h2, h3, h4, caption, thead th {
font-family: "Essays 1743", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
font-weight: normal;
text-transform: uppercase;
text-shadow: 0 0 1px #667;
}
h1 {
font-size: 266.7%;
line-height: 1.1;
text-align: center;
width: 100%;
margin: 1.49em 0;
}
h2 {
font-size: 210%;
line-height: 1.3125;
margin: 1.167em 0;
text-align: center;
clear: both;
}
h3 {
font-size: x-large;
line-height: 1.167;
margin: 1.556em 0;
text-align: center;
}
h1:before {
content: "\2116" counter(h1) ".";
}
/* video */
video {
display: block;
margin: 0 auto;
}
/* browser compatibility and other tables */
.bc, .st {
width: 100%;
border-collapse: collapse;
}
.bc tbody th, .bc thead th.l, tfoot td {
text-align: left;
}
.bc thead th, .bc td {
text-align: center;
}
tfoot {
font-size: small;
}
.st {
border: 1px solid;
}
.st th {
text-align: left;
font-weight: normal;
}
.st tr > th:first-child {
padding-left: 5px;
}
.ho th {
border-bottom: 1px solid;
}
.zebra {
background: #eee;
}
/* asterism styles */
.rotatedFloralHeartBullet:after { content: "\2767" }
.triangularBullet:after { content: "\2023" }
.leftwardsWaveArrow:after { content: "\219C" }
.rightwardsWaveArrow:after { content: "\219D" }
.leftwardsSquiggleArrow:after { content: " \21DC" }
.rightwardsSquiggleArrow:after { content: "\21DD" }
.whiteRightPointingIndex:after { content: "\261E" }
.anticlockwiseTopSemicircleArrow:after { content: "\21B6" }
.clockwiseTopSemicircleArrow:after { content: "\21B7" }