forked from cognitom/paper-css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
paper.css
58 lines (52 loc) · 1.99 KB
/
paper.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
/* Styling based on paper-css by cognitom (https://github.com/cognitom/paper-css)
With modications necessary for NxTx
License: MIT */
@page { margin: 0 }
body { margin: 0 }
.sheet {
margin: 0;
overflow: hidden;
position: relative;
box-sizing: border-box;
page-break-after: always;
}
/** Paper sizes **/
.nxtx-root.A3 .sheet { width: 297mm; height: 419mm }
.nxtx-root.A3.landscape .sheet { width: 420mm; height: 296mm }
.nxtx-root.A4 .sheet { width: 210mm; height: 296mm }
.nxtx-root.A4.landscape .sheet { width: 297mm; height: 209mm }
.nxtx-root.A5 .sheet { width: 148mm; height: 209mm }
.nxtx-root.A5.landscape .sheet { width: 210mm; height: 147mm }
.nxtx-root.letter .sheet { width: 216mm; height: 279mm }
.nxtx-root.letter.landscape .sheet { width: 280mm; height: 215mm }
.nxtx-root.legal .sheet { width: 216mm; height: 356mm }
.nxtx-root.legal.landscape .sheet { width: 357mm; height: 215mm }
/** Padding area **/
.sheet.padding-10mm { padding: 10mm }
.sheet.padding-15mm { padding: 15mm }
.sheet.padding-20mm { padding: 20mm }
.sheet.padding-25mm { padding: 25mm }
/** For screen preview **/
@media screen {
body { background: #e0e0e0 }
.sheet {
background: white;
box-shadow: 0 .5mm 2mm rgba(0,0,0,.3);
margin: 5mm auto;
}
}
/** Fix for Chrome issue #273306 **/
@media print {
.nxtx-root.A3.landscape { width: 420mm }
.nxtx-root.A3, .nxtx-root.A4.landscape { width: 297mm }
.nxtx-root.A4, .nxtx-root.A5.landscape { width: 210mm }
.nxtx-root.A5 { width: 148mm }
.nxtx-root.letter, .nxtx-root.legal { width: 216mm }
.nxtx-root.letter.landscape { width: 280mm }
.nxtx-root.legal.landscape { width: 357mm }
}
@media print { .no-print { display: none } }
.error { color: red }
.warning { color: darkorange }
.no-errors .error { display: none }
.no-errors .warning { display: none }