-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmain.css
374 lines (374 loc) · 7.02 KB
/
main.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
/* the geometry of the page */
/* the size of the crop marks*/
/* the size of bleed */
/**
* Computation
*/
/* EXTRA SPACE AROUND THE PAGE: BLEED + CROP */
/* GEOMETRY OF THE PAPER SHEET */
/* SIZE OF SPREAD */
/**
* DEFINITION OF THE PAPER SHEET
*/
@page {
size: 172mm 235mm;
margin: 0;
}
/**
* CANVAS
*/
@media all {
body {
margin: 0;
}
.paper {
width: 172mm;
height: 234mm;
box-sizing: border-box;
counter-increment: page-counter;
page-break-inside: avoid;
page-break-after: always;
overflow: hidden;
/* Crop marks */
padding: 12mm;
position: relative;
}
.paper .crops {
width: 172mm;
height: 234mm;
position: absolute;
top: 0;
left: 0;
}
.paper .crops div {
border-style: solid;
border-color: black;
border-width: 0;
width: 12mm;
height: 12mm;
position: absolute;
box-sizing: border-box;
}
.paper .crops div span {
width: 5mm;
height: 5mm;
background-color: white;
position: absolute;
}
.paper .crops .crop-top-left {
border-right-width: 1px;
border-bottom-width: 1px;
top: 0;
left: 0;
}
.paper .crops .crop-top-left span {
right: -1px;
bottom: -1px;
}
.paper .crops .crop-top-right {
border-left-width: 1px;
border-bottom-width: 1px;
top: 0;
right: 0;
}
.paper .crops .crop-top-right span {
left: -1px;
bottom: -1px;
}
.paper .crops .crop-bottom-right {
border-left-width: 1px;
border-top-width: 1px;
right: 0;
bottom: 0;
}
.paper .crops .crop-bottom-right span {
left: -1px;
top: -1px;
}
.paper .crops .crop-bottom-left {
border-right-width: 1px;
border-top-width: 1px;
left: 0;
bottom: 0;
}
.paper .crops .crop-bottom-left span {
right: -1px;
top: -1px;
}
.page {
width: 148mm;
height: 210mm;
position: relative;
}
.spread .paper {
float: left;
}
.spread .paper:nth-child(odd) {
margin-left: -12mm;
}
.spread .paper:nth-child(even) {
margin-right: -12mm;
}
.spread .paper:first-child {
margin-left: 148mm;
}
}
@media print {
html {
width: 172mm;
}
body {
/* Allows printing of background colors */
background-color: white;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
/* Activate opentype features and kernings */
-webkit-font-feature-settings: "liga", "dlig", "clig", "kern";
text-rendering: optimizeLegibility;
}
}
/**
* Helpers
*/
.region-break {
/* Apply this class to an element to put it on a new region.
* Hint:
* You can also use an empty <div class="page-break"></div>
* if you want to put manual page breaks without attaching it to an HTML element
*/
-webkit-region-break-before: always;
}
.header,
.body,
.footer {
box-sizing: border-box;
}
/* __________________________________ HEADER __________________________________ */
.header {
top: 0;
margin: 0;
padding-top: 10mm;
width: 100%;
height: 10mm;
text-align: left;
}
.header:after {
content: " Running title";
}
/* __________________________________ MAIN SECTION __________________________________ */
.body {
height: 190mm;
width: 148mm;
margin-bottom: 15mm;
padding-top: 20mm;
padding-bottom: 15mm;
position: absolute;
}
.recipient {
-webkit-flow-from: myStory;
flow-from: myStory;
}
#my-story {
-webkit-flow-into: myStory;
flow-into: myStory;
}
/* __________________________________ FOOTER __________________________________ */
.footer {
position: absolute;
bottom: 0;
margin: 0;
width: 100%;
height: 10mm;
text-align: center;
}
.footer:after {
content: counter(page-counter);
}
/* mirrored pages */
.paper:nth-child(odd) .header {
text-align: right;
}
.paper:nth-child(odd) .header,
.paper:nth-child(odd) .body,
.paper:nth-child(odd) .footer {
padding-left: 20mm;
padding-right: 10mm;
}
.paper:nth-child(even) .header,
.paper:nth-child(even) .body,
.paper:nth-child(even) .footer {
padding-left: 10mm;
padding-right: 20mm;
}
img {
max-width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
/* Avoids headings to be cut or to be orphans.
* But it doesn't seem to work
* if the element after has a page-break-inside avoid. It tries its best! */
-webkit-region-break-inside: avoid;
-webkit-region-break-after: avoid;
}
/* AN EXAMPLE TO AVOID PAGE BREAK INSIDE,
* HERE NO PARAGRAPH WILL BE CUT,
* BUT YOU MIGHT WANT TO DEACTIVATE THIS */
p {
/*-webkit-region-break-inside: avoid;*/
}
/**
* DEBUG STYLES
*/
.debug .header {
outline: 1px solid pink;
}
.debug .body {
outline: 1px solid purple;
}
.debug .footer {
outline: 1px solid pink;
}
.debug .region-break {
border-top: 1px dashed blue;
box-sizing: border-box;
}
.debug img {
outline: 1px solid blue;
}
/**
* User Interface
*/
@media screen {
body {
background-color: #F0F0F0;
}
#pages {
width: 172mm;
height: 234mm;
margin-left: auto;
margin-right: auto;
}
.spread #pages {
width: 344mm;
height: 468mm;
}
.paper {
/* centrer la page à l'écran */
background-color: white;
margin-top: 1em;
margin-bottom: 1em;
}
.normal .page {
outline: 1px dashed lightsalmon;
}
.preview .paper {
background: none;
}
.preview .page {
outline: 1px solid lightgray;
background-color: white;
}
.button {
z-index: 1000;
background-color: black;
font-family: sans-serif;
text-transform: uppercase;
font-size: 9pt !important;
letter-spacing: 1pt;
color: white;
margin: 0;
padding: 5pt 7pt;
cursor: pointer;
border: 0;
}
.button:hover {
background-color: white;
color: black;
outline: 1pt solid black;
}
.button-active {
background-color: white;
color: black;
outline: 1pt solid black;
}
.lo-res {
outline: 10px solid red;
}
#interface {
font-family: sans-serif;
text-transform: uppercase;
font-size: 10pt !important;
line-height: 14pt;
letter-spacing: 1pt;
position: fixed;
bottom: 10pt;
right: 10pt;
}
#interface a {
text-decoration: none;
position: static;
}
div.dropdown {
display: inline-block;
position: relative;
}
div.dropdown ul {
padding: 0.5em 0;
display: none;
background-color: black;
position: absolute;
right: 0;
bottom: 2em;
height: 200pt;
width: 80pt;
overflow: auto;
}
div.dropdown ul a {
padding: 0 1em;
color: white;
display: block;
}
div.dropdown ul a:hover {
background-color: white;
color: black;
}
div.dropdown button {
width: 80pt;
}
#toc {
display: inline-block;
}
#toc-pages {
padding: 0.5em 0;
display: none;
background-color: black;
position: absolute;
right: 0;
bottom: 2em;
height: 200pt;
width: 80pt;
overflow: auto;
}
#toc-pages a {
padding: 0 1em;
color: white;
}
#toc-pages a:hover {
background-color: white;
color: black;
}
#toc-pages button {
width: 80pt;
}
}
@media print {
#interface {
display: none;
}
}
/* Here you can put your specific typography, layout styles. */