UNPKG

2.72 kBCSSView Raw
1/*
2 * Copyright 2015 Trim-marks Inc.
3 * Copyright 2019 Vivliostyle Foundation
4 *
5 * Vivliostyle.js is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * Vivliostyle.js is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with Vivliostyle.js. If not, see <http://www.gnu.org/licenses/>.
17 *
18 */
19
20[data-vivliostyle-layout-box] {
21 position: absolute;
22 left: 0;
23 top: 0;
24 right: 0;
25 bottom: 0;
26 overflow: hidden;
27 z-index: -1;
28}
29
30[data-vivliostyle-debug] [data-vivliostyle-layout-box] {
31 right: auto;
32 bottom: auto;
33 overflow: visible;
34 z-index: auto;
35}
36
37[data-vivliostyle-page-container] {
38 position: relative;
39 overflow: hidden;
40}
41
42[data-vivliostyle-bleed-box] {
43 position: absolute;
44 overflow: hidden;
45 max-width: 100%;
46 max-height: 100%;
47 box-sizing: border-box;
48}
49
50[data-vivliostyle-page-box] ~ [data-vivliostyle-page-box] {
51 display: none;
52}
53
54[data-vivliostyle-toc-box] {
55 position: absolute;
56 left: 3px;
57 top: 3px;
58 overflow: scroll;
59 overflow-x: hidden;
60 background: rgba(248, 248, 248, 0.9);
61 border-radius: 2px;
62 box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
63}
64
65@media print {
66 [data-vivliostyle-toc-box] {
67 display: none;
68 }
69
70 [data-vivliostyle-outer-zoom-box],
71 [data-vivliostyle-spread-container] {
72 width: 100% !important;
73 height: 100% !important;
74 }
75
76 [data-vivliostyle-spread-container],
77 [data-vivliostyle-page-container] {
78 -moz-transform: none !important;
79 -ms-transform: none !important;
80 -webkit-transform: none !important;
81 transform: none !important;
82 }
83
84 [data-vivliostyle-page-container] {
85 display: block !important;
86 max-width: 100%;
87 height: 100% !important;
88 max-height: 100%;
89 }
90
91 /* Workaround for Chrome printing problem */
92 /* [data-vivliostyle-page-box] {
93 padding-bottom: 0 !important;
94 overflow: visible !important;
95 } */
96 [data-vivliostyle-bleed-box] > div > div::before {
97 display: block;
98 content: "";
99 padding-top: 0.015625px;
100 margin-bottom: -0.015625px;
101 }
102
103 /* Gecko-only hack, see https://bugzilla.mozilla.org/show_bug.cgi?id=267029#c17 */
104 @-moz-document regexp('.*') {
105 [data-vivliostyle-page-container]:nth-last-child(n + 2) {
106 top: -1px;
107 margin-top: 1px;
108 margin-bottom: -1px;
109 }
110 }
111}