Debian Codegraph @

scss/themes/book.scss

raw
1 // Experimental
2
3 h1,
4 article {
5 page-break-before: always;
6 }
7
8 body {
9 counter-reset: h1num h2num h3num h4num figurenum;
10 padding: 0;
11 text-align: justify;
12 }
13
14 h1:before {
15 content: counter(h1num) '. ';
16 counter-increment: h1num;
17 }
18
19 h2:before {
20 content: counter(h1num) '.'counter(h2num) '. ';
21 counter-increment: h2num;
22 }
23
24 h3:before {
25 content: counter(h1num) '.' counter(h2num) '.'counter(h3num) '. ';
26 counter-increment: h3num;
27 }
28
29 h4:before {
30 content: counter(h1num) '.' counter(h2num) '.'counter(h3num) '.' counter(h4num) '. ';
31 counter-increment: h4num;
32 }
33
34 figcaption:before {
35 content: counter(h1num) '-' counter(figurenum) '. ';
36 counter-increment: figurenum;
37 }
38
39 figcaption {
40 margin: 0 auto;
41 max-width: 100%;
42 text-align: center;
43 }
44
45 img,
46 table {
47 margin: 0 auto;
48 }
49
50 // Not supported by all browsers
51 @page {
52 margin-bottom: 2.5cm;
53 margin-top: 2.5cm;
54 }
55
56 @page :left {
57 margin-left: 4cm;
58 margin-right: 3cm;
59 }
60
61 @page :right {
62 margin-left: 3cm;
63 margin-right: 4cm;
64 }