-
Notifications
You must be signed in to change notification settings - Fork 230
/
Copy pathcrxviewer.less
411 lines (383 loc) · 9.62 KB
/
crxviewer.less
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
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
/**
* (c) 2013 Rob Wu <rob@robwu.nl>
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@rightPanelWidth: 250px;
@resizerWidth: 8px;
@fileSizeWidth: 4rem;
@fileSpecificToolbarHeight: 2rem;
@topBarHeight: 2rem;
@footerHeight: 3rem;
@footerFontsize: 0.9rem;
* {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
// Prevent overscrolling in Chrome. The content is expected to fit exactly,
// and otherwise the scrollbars will appear in the child elements of <body>.
overflow: hidden;
}
body {
font-family: "Segoe UI", "Lucida Grande", Tahoma, sans-serif;
font-size: 100%;
}
#top-bar {
@fileFilterWidth: 300px;
@barPadding: 0.2rem;
display: -webkit-flex;
display: flex;
width: 100%;
height: @topBarHeight;
border-bottom: 2px solid #DDD;
padding: @barPadding;
position: relative;
// On small screens the togglers may overflow to the next line.
// Make sure that they are visible if the user interacts with the top bar.
&:hover {
z-index: 10;
}
#file-filter {
vertical-align: middle;
width: @fileFilterWidth;
max-width: 100%;
height: 1.4rem;
border: 1px solid #AAA;
padding: 3px;
color: #444;
&:focus {
outline: none;
border-color: rgb(77, 144, 254);
}
&.invalid {
background-color: #FEE;
& ~ label {
// Require the user to fix the regex before using the checkboxes
display: none;
}
}
}
label {
vertical-align: middle;
display: -webkit-inline-flex;
display: inline-flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
// This weird play with negative margins is to make sure that there is some
// visible padding when the labels overflow to the next line.
margin: -0.1rem 0;
padding: 0.1rem 3px;
background: white;
height: 1.8rem;
// ^^^ = 2 * 0.1 (padding) + 0.8 (description) + 0.8 (checkbox/counter) = 1.8rem.
&:hover {
outline: 1px solid rgba(0, 0, 0, 0.2);
}
// The meaning of the checkbox, displayed above the checkbox.
.filter-label-description {
-webkit-flex: 0 0 100%;
flex: 0 0 100%;
order: 1;
font-size: 0.7rem;
height: 0.8rem;
}
// Below the label description, checkbox at the left,
// file counter at the right (gcount is inserted by JS).
input[data-filter-type],
.gcount {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
order: 2;
margin: 0;
font-size: 0.7rem;
height: 0.8rem;
}
input[data-filter-type] {
}
.gcount {
// Set a very small width so that the flex label does not get too wide.
// It is not zero so that the counter always has some size.
padding-left: 2px;
width: 2px;
}
}
#file-filter-feedback {
-webkit-flex: 1;
flex: 1;
}
& > a[href] {
margin: 0 5px;
}
& > a:not([href]) {
display: none;
}
}
#advanced-open {
display: none;
height: -webkit-calc(100% - ((@topBarHeight + @footerHeight)));
height: calc(100% - ((@topBarHeight + @footerHeight)));
text-align: center;
padding: 2rem 1rem 0;
overflow: auto;
&.visible {
& ~ #right-panel, & ~ #left-panel {
display: none;
}
display: block;
}
input {
padding: 0.5rem;
}
}
#advanced-open-form {
input[type=url] {
display: block;
width: 90%;
margin: 0.3rem 5%;
}
}
.site-specific-form {
display: inline-block;
text-align: left;
padding: 1rem;
transition: opacity 0.2s;
&.disabled-site:not(:hover):not(.focused-form) {
opacity: 0.3;
input:invalid {
outline: none;
}
}
.labeltext {
display: inline-block;
width: 16ch;
}
> div:hover {
background-color: #F5F5F5;
}
label, input[type=text] {
display: inline-block;
padding: 0.5rem;
}
label {
&:hover, &:active {
background-color: #ddd;
}
}
input[type=text] {
// Fit at least the extension ID (32 chars) and browser version (max 24 chars)
width: 64ch;
}
input:invalid {
outline: auto red
}
}
.amoxpilist {
a {
display: block;
padding: 0.3em;
}
}
#right-panel, #left-panel {
height: -webkit-calc(100% - @topBarHeight);
height: calc(100% - @topBarHeight);
}
#right-panel {
padding-left: (2 * @resizerWidth + @rightPanelWidth);
}
#left-panel {
z-index: 1;
position: absolute;
display: inline-block;
width: @rightPanelWidth;
background-color: #FFF;
& > .content {
overflow-y: auto;
max-height: 100%;
}
& > .resizer {
height: 100%;
position: absolute;
top: 0;
right: -@resizerWidth;
width: @resizerWidth;
background-color: #DDD;
cursor: col-resize;
&:hover {
background-color: #AAA;
}
}
}
footer {
height: @footerHeight;
border-top: 1px dotted #ccf;
font-size: @footerFontsize;
padding: (((@footerHeight - @footerFontsize) / 2)) 0;
text-align: center;
}
#initial-status {
white-space: pre-wrap;
word-wrap: break-word;
text-align: center;
progress {
width: 300px;
max-width: 100%;
}
}
.toggled {
width: 0 !important;
& > .content {
display: none;
}
}
.toggled + .toggleable {
// Override inline declaration
padding-left: (2 * @resizerWidth) !important;
}
.toggler {
@triangleWidth: @resizerWidth;
cursor: pointer;
// Triangle:
width: 0;
height: 0;
border: 10px solid transparent;
border-left: 0;
border-right: @triangleWidth solid rgba(0,0,0,0.5);
&:hover {
border-right-color: #000;
}
.toggled & {
border-left: @triangleWidth solid black;
border-right: 0;
}
}
#file-list {
margin: 0;
padding: 0;
list-style-type: none;
&.gfilter-images li.gtype-images,
&.gfilter-code li.gtype-code,
&.gfilter-markup li.gtype-markup,
&.gfilter-locales li.gtype-locales,
&.gfilter-misc li.gtype-misc,
li.file-filtered, li.grep-no-match {
display: none;
}
li.grep-unknown {
opacity: 0.5;
}
li {
position: relative;
overflow-x: hidden;
cursor: default;
&:hover {
background-color: rgba(99,99,99,0.2);
}
&.active {
background-color: rgba(99,99,99,0.3);
}
&.file-selected {
background-color: #def;
}
.file-path {
position: absolute;
min-width: 100%;
box-sizing: border-box;
padding-left: @fileSizeWidth;
right: @fileSizeWidth;
white-space: pre;
.file-dir {
color: #888;
&:hover {
color: #000;
}
}
}
.file-size {
width: @fileSizeWidth;
float: right;
text-align: right;
}
}
}
.total-size-wrapper {
text-align: right;
}
#total-size {
display: inline-block;
width: @fileSizeWidth;
border-top: 1px solid black;
}
#source-toolbar {
height: @fileSpecificToolbarHeight;
line-height: @fileSpecificToolbarHeight;
position: relative;
}
#source-code {
max-height: calc(100% - @fileSpecificToolbarHeight);
overflow: auto;
font-family: monospace;
white-space: pre;
-moz-tab-size: 2;
tab-size: 2;
.auto-wordwrap {
white-space: pre-wrap;
word-break: break-all;
}
}
.file-specific-toolbar {
> button {
margin: 0 0.1rem;
}
.find-all-enabled {
color: red;
// Same style as .search-result-highlight in search-tools.less to help
// users with getting familiar with the look of highlighted results.
outline: 1px solid orange;
background: rgba(255, 255, 100, 0.3);
}
}
.file-specific-download-link {
// Fixed-width font so that file-specific download links have a fixed width
// ("Show download", "Creating link" and "Download file" have the same
// number of characters).
font-family: monospace;
&:not([href]) {
cursor: pointer;
border-bottom: 1px dotted;
&:hover {
border-bottom-style: solid;
}
}
}
.content-verifier-wrapper {
display: inline-block;
.content-verifier-output {
// positioned relative to the toolbar.
position: absolute;
left: 0;
// Allow some space for the source container scrollbar to be visible, if any.
right: 30px;
max-height: calc(100vh - ((@topBarHeight + @fileSpecificToolbarHeight)));
overflow: auto;
background: white;
padding: 1rem;
border: 1px solid #ccf;
line-height: 1.5rem;
// Above search highlights.
z-index: 1;
}
}
.info-table-row > :first-child {
font-weight: bold;
white-space: pre;
}
img:hover {
// Subtle box around image to see the size of images that are
// almost fully transparent or white.
outline: 1px solid rgba(200, 200, 200, 0.5);
}
@import (less) "search-tools.less";