Repository navigation
Expand file tree
/
Copy pathviewer.css
More file actions
168 lines (157 loc) · 3.05 KB
/
Copy pathviewer.css
File metadata and controls
168 lines (157 loc) · 3.05 KB
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
:root {
--grid-size: 16px;
/* Replaced with the resolved page box once a flow has run; until then it
only has to keep #output from collapsing to the gap width. */
--page-inline-size: 50vw;
--page-block-size: auto;
}
/* Paged.js adopts the transformed print sheet into this document, and adopted
sheets cascade after every <link>, so an example's own body rules (Moby-Dick
sets max-width and padding) outrank viewer.css unless these are forced. */
body {
margin: 0 !important;
padding: 0 !important;
max-width: none !important;
background-color: #fafafa !important;
background-image: radial-gradient(circle, #ddd 1px, transparent 1px) !important;
background-size: var(--grid-size) var(--grid-size) !important;
}
#header {
font-family: monospace;
font-size: 12px;
color: #000;
padding: 12px;
margin: 0 auto;
}
#header input,
#header button {
font-family: monospace;
font-size: 12px;
padding: 2px 4px;
margin: 0;
}
#header dd.controls {
display: flex;
gap: 4px;
align-items: baseline;
}
#header dd.controls input[type="text"]:first-child {
flex: 1;
}
#header dl {
display: flex;
flex-wrap: wrap;
gap: 2px 0;
margin: 0 auto;
min-width: 400px;
max-width: 600px;
align-items: baseline;
}
#header dt {
color: #888;
width: 60px;
text-align: right;
margin-right: 12px;
}
#header dd {
margin: 0;
flex: 1;
min-width: calc(100% - 72px);
min-height: 22px;
}
#header .issue-count {
color: #c00;
font-weight: bold;
}
/* Page spread grid */
#output {
position: relative;
padding: var(--grid-size);
max-width: calc(var(--page-inline-size) * 2 + var(--grid-size));
margin: 0 auto;
}
#output > .error {
font: 12px/1.5 monospace;
color: #c00;
white-space: pre-wrap;
margin: 0;
}
page-preview {
display: block;
}
paged-document {
display: grid;
grid-template-columns: repeat(2, max-content);
grid-auto-flow: row;
gap: var(--grid-size);
justify-content: center;
}
paged-page[verso] {
grid-column: 1;
}
paged-page[recto] {
grid-column: 2;
}
paged-page {
/* Outranks the component's own `@media screen :host` margin, which would
otherwise add to the grid gap. */
margin: 0;
zoom: var(--page-scale, 1);
background: #fff;
outline: 1px solid #ddd;
}
paged-page.has-issues {
outline: 2px solid red;
}
/* The component's :host display would otherwise beat the UA [hidden] rule. */
paged-page[hidden] {
display: none;
}
#overlays {
position: absolute;
inset: 0;
pointer-events: none;
}
/* Fragment borders overlay */
.fragment-overlay {
position: absolute;
inset: 0;
pointer-events: none;
display: none;
}
.fragment-overlay.active {
display: block;
}
.fragment-overlay [data-frag-label] {
position: absolute;
font: 9px/1 monospace;
background: rgba(255, 255, 255, 0.75);
padding: 0 2px;
white-space: nowrap;
}
@media print {
#header {
display: none !important;
}
#overlays {
display: none !important;
}
body {
margin: 0 !important;
background: none !important;
}
#output {
padding: 0;
max-width: none;
}
paged-document {
display: block;
}
paged-page {
zoom: 1;
outline: none;
}
paged-page.has-issues {
outline: none;
}
}