-
Notifications
You must be signed in to change notification settings - Fork 5
/
ui.html
531 lines (512 loc) · 25.8 KB
/
ui.html
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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
<div id="control-panel" class="control-panel">
<button id="control-panel-settings-button" class="control-panel-settings-button image-button">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/settings.svg" width="18" height="18">
</button>
<div id="mode-indicator" class="mode-indicator">
<div id="mode-position" class="mode mode--position" title="Use keyboard to move element.">
<img class="mode-icon" width="34" height="34" src="chrome-extension://__MSG_@@extension_id__/images/icons/position.svg">
<p class="mode-text">Move</p>
</div>
<div id="mode-resize-se" class="mode mode--resize-se" title="Use keyboard to resize bottom/right edges.">
<img class="mode-icon" width="34" height="34" src="chrome-extension://__MSG_@@extension_id__/images/icons/resize-se.svg">
<p class="mode-text">Resize</p>
</div>
<div id="mode-resize-nw" class="mode mode--resize-nw" title="Use keyboard to resize top/left edges.">
<img class="mode-icon" width="34" height="34" src="chrome-extension://__MSG_@@extension_id__/images/icons/resize-nw.svg">
<p class="mode-text">Resize</p>
</div>
<div id="mode-background" class="mode mode--background" title="Use keyboard to move background.">
<img class="mode-icon" width="34" height="34" src="chrome-extension://__MSG_@@extension_id__/images/icons/background.svg">
<p class="mode-text">Background</p>
</div>
<div id="mode-rotate" class="mode mode--rotate" title="Use keyboard to adjust rotation.">
<img class="mode-icon" width="34" height="34" src="chrome-extension://__MSG_@@extension_id__/images/icons/rotate.svg">
<p class="mode-text">Rotate</p>
</div>
<div id="mode-z-index" class="mode mode--z-index" title="Use keyboard to adjust z-index.">
<img class="mode-icon" width="34" height="34" src="chrome-extension://__MSG_@@extension_id__/images/icons/z-index.svg">
<p class="mode-text">Z-Index</p>
</div>
</div>
<div class="control-panel-area" id="default-area">
<img class="default-area-icon" src="chrome-extension://__MSG_@@extension_id__/images/icons/pointer.svg">
<p class="default-area-text">Select Element</p>
</div>
<div class="control-panel-area element-area" id="element-area">
<h3 id="element-selector" class="element-selector"></h3>
<p id="element-properties" class="element-field" title="Box Properties">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/dimensions-square.svg" class="element-property-icon" width="13" height="13">
<span class="element-property" id="element-position" title="Position"></span>
<span class="element-property" id="element-dimensions" title="Dimensions"></span>
<span class="element-property" id="element-zindex" title="Z-Index"></span>
</p>
<p class="element-field element-extra element-extra-transform" title="Transform">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/transform-square.svg" class="element-property-icon" width="13" height="13">
<span id="element-transform" class="element-extra-property"></span>
</p>
<p class="element-field element-extra element-extra-background-position" title="Background Position">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/background-square.svg" class="element-property-icon" width="13" height="13">
<span id="element-background-position" class="element-extra-property"></span>
</p>
</div>
<div class="control-panel-area multiple-area" id="multiple-area">
<h3 id="multiple-header" class="multiple-header"></h3>
<div class="multiple-button-frame">
<span id="align-buttons">
<button id="align-top-button" class="align-button image-button" title="Align top edge">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/align-top.svg" width="16" height="16">
</button>
<button id="align-vcenter-button" class="align-button image-button" title="Align vertical center">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/align-vcenter.svg" width="16" height="16">
</button>
<button id="align-bottom-button" class="align-button image-button" title="Align bottom edge">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/align-bottom.svg" width="16" height="16">
</button>
<button id="align-left-button" class="align-button image-button" title="Align left edge">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/align-left.svg" width="16" height="16">
</button>
<button id="align-hcenter-button" class="align-button image-button" title="Align horizontal center">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/align-hcenter.svg" width="16" height="16">
</button>
<button id="align-right-button" class="align-button image-button" title="Align right edge">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/align-right.svg" width="16" height="16">
</button>
</span>
<span id="distribute-buttons" class="distribute-buttons">
<button id="distribute-hcenter-button" class="align-button image-button" title="Distribute horizontally">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/distribute-hcenter.svg" width="16" height="16">
</button>
<button id="distribute-vcenter-button" class="align-button image-button" title="Distribute vertically">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/distribute-vcenter.svg" width="16" height="16">
</button>
</span>
</div>
<div id="highlight-buttons" class="highlight-buttons"></div>
</div>
<div class="control-panel-area settings-area" id="settings-area">
<h3 class="settings-area-tabs">
<span id="settings-tab-basic" class="settings-tab settings-tab--basic">Settings</span>
<span id="settings-tab-advanced" class="settings-tab settings-tab--advanced">Advanced</span>
<span id="settings-tab-help" class="settings-tab settings-tab--help">Help</span>
</h3>
<div class="settings-area-container">
<form id="settings-form" class="settings-form">
<div class="settings-form-page-container">
<div class="settings-form-page settings-form-page--basic">
<fieldset class="settings-field">
<div class="settings-label">
<label for="save-filename">
Filename when saving:
</label>
</div>
<div class="settings-control">
<input type="text" id="save-filename" value="styles.css"
class="settings-input" placeholder="Filename">
</div>
</fieldset>
<fieldset class="settings-field" name="include-selector-field">
<div class="settings-label settings-label--help" title="Note that this setting will override the default, which is to target only absolute and fixed position elements. When using this setting, static elements will be forced to relative.">
<label for="include-selector" class="tooltip">
Include elements matching:
</label>
</div>
<div class="settings-control">
<input type="text" id="include-selector"
class="settings-input" placeholder="CSS Selector">
</div>
</fieldset>
<fieldset class="settings-field" name="exclude-selector-field">
<div class="settings-label">
<label for="exclude-selector">
Exclude elements matching:
</label>
</div>
<div class="settings-control">
<input type="text" id="exclude-selector"
class="settings-input" placeholder="CSS Selector">
</div>
</fieldset>
<fieldset class="settings-field">
<div class="settings-label">
<label for="tab-style">
Tab style:
</label>
</div>
<div class="settings-control">
<select id="tab-style">
<option value="tab">Tab</option>
<option value="two" selected>Two Spaces</option>
<option value="four">Four Spaces</option>
<option value="eight">Eight Spaces</option>
</select>
</div>
</fieldset>
<fieldset class="settings-field">
<div class="settings-label">
<label for="output-selector">
Output selector:
</label>
</div>
<div class="settings-control">
<select id="output-selector">
<option value="auto" selected>Auto</option>
<option value="none">None</option>
<option value="id">Id</option>
<option value="first">First Class</option>
<option value="longest">Longest Class</option>
<option value="all">All Classes</option>
<option value="tag">Tag</option>
<option value="tag-nth">Tag:nth-child</option>
</select>
<div class="linked-select-description">
<div class="select-linked-area" data-linked-option="auto">
<p>Element id or first class will be used.</p>
<code class="code-line">#id | .first { ... }</code>
</div>
<div class="select-linked-area" data-linked-option="none">
<p>No selector used. Styles will be inline.</p>
<code class="code-line">width: 200px; height: 200px; ...</code>
</div>
<div class="select-linked-area" data-linked-option="id">
<p>Element id will be used.</p>
<code class="code-line">#id { ... }</code>
</div>
<div class="select-linked-area" data-linked-option="first">
<p>First class name found will be used.</p>
<code class="code-line">.first { ... }</code>
</div>
<div class="select-linked-area" data-linked-option="longest">
<p>Longest class name found will be used.</p>
<code class="code-line">.long-class-name { ... }</code>
</div>
<div class="select-linked-area" data-linked-option="all">
<p>All class names will be output together.</p>
<code class="code-line">.one.two.three { ... }</code>
</div>
<div class="select-linked-area" data-linked-option="tag">
<p>Only the tag name will be used.</p>
<code class="code-line">div { ... }</code>
</div>
<div class="select-linked-area" data-linked-option="tag-nth">
<p>Tag name + nth-child selector will be used.</p>
<code class="code-line">li:nth-child(3) { ... }</code>
</div>
</div>
</div>
</fieldset>
<fieldset class="settings-field">
<div class="settings-label">
<label for="output-changed-only">
Only output changed styles:
</label>
</div>
<div class="settings-control">
<input type="checkbox" id="output-changed-only">
</div>
</fieldset>
</div>
<div class="settings-form-page settings-form-page--advanced">
<fieldset class="settings-field" name="snap-field">
<div class="settings-label">
<label for="snap-x">
Snap to grid:
</label>
</div>
<div class="settings-control">
<input type="number" id="snap-x" class="snap-control">
<span class="snap-separator">×</span>
<input type="number" id="snap-y" class="snap-control">
</div>
</fieldset>
<fieldset class="settings-field">
<div class="settings-label">
<label for="output-grouping">
Group common styles:
</label>
</div>
<div class="settings-control">
<select id="output-grouping">
<option value="none" selected>None</option>
<option value="auto">Auto</option>
<option value="map">Map</option>
<option value="remove">Remove</option>
</select>
<div class="linked-select-description">
<div class="select-linked-area" data-linked-option="none">
<p>Common styles will not be grouped.</p>
<div class="code-block">
<code>.one { width: 100px; top: 100px; }</code>
<code>.two { width: 100px; left: 100px; }</code>
</div>
</div>
<div class="select-linked-area" data-linked-option="auto">
<p>Common styles will be grouped by either the longest common class or all selectors together.</p>
<div class="code-block">
<code>.one, .two { width: 100px; }</code>
<code>.one { top: 100px; }</code>
<code>.two { left: 100px; }</code>
</div>
</div>
<div class="select-linked-area" data-linked-option="map">
<p>Common styles will be mapped to variables defined in the field below.</p>
<div class="code-block">
<code>$width: 100px;</code>
<code>.one { width: $width; top: 100px; }</code>
<code>.two { width: $width; left: 100px; }</code>
</div>
<fieldset name="grouping-map-field" class="grouping-map-field">
<textarea rows="4" cols="30"
id="grouping-map" class="grouping-map"
placeholder="width: $width; height: $height; ..."></textarea>
</fieldset>
</div>
<div class="select-linked-area" data-linked-option="remove">
<p>Common styles will be removed.</p>
<div class="code-block">
<code>.one { top: 100px; }</code>
<code>.two { left: 100px; }</code>
</div>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<button type="reset" class="settings-reset">Clear All</button>
<button type="submit" class="settings-save">Save</button>
</form>
<div class="settings-help">
<div class="help-area-block help-area-block--keyboard">
<h3 class="help-area-header">Keyboard</h3>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/arrow-key.svg"
class="help-area-arrow-key-icon">
</span>
</div>
<p class="help-area-text">Use the arrow keys to nudge the element.</p>
</div>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large">⇧</span>
</div>
<p class="help-area-text">Shift: Constrain dragging / nudge multiplier / select multiple.</p>
</div>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large">⌃</span>
</div>
<p class="help-area-text">Ctrl: Move the background image when dragging.</p>
</div>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large">⌥</span>
</div>
<p class="help-area-text">Option/Alt: Peek at the background image.</p>
</div>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large key-icon--command">
<span class="key-icon--mac">⌘</span>
<span class="key-icon--win key-icon--wingdings">ÿ</span>
</span>
</div>
<p class="help-area-text">Cmd/Win: While dragging, temporarily move a single element.</p>
</div>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large">m</span>
</div>
<p class="help-area-text">Move nudge mode.</p>
</div>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large">s</span>
</div>
<p class="help-area-text">Resize nudge mode.</p>
</div>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large">b</span>
</div>
<p class="help-area-text">Background position nudge mode.</p>
</div>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large">r</span>
</div>
<p class="help-area-text">Rotation nudge mode.</p>
</div>
<div class="help-area-item">
<div class="help-area-graphic">
<span class="key-icon key-icon--large">z</span>
</div>
<p class="help-area-text">Z-index nudge mode.</p>
</div>
</div>
<div class="help-area-block help-area-block--mouse">
<h3 class="help-area-header">Mouse</h3>
<div class="help-area-item">
<span class="help-area-graphic help-area-graphic--solid">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/position.svg"
class="help-area-position-icon">
</span>
<p class="help-area-text">Drag the middle of the element to move it around.</p>
</div>
<div class="help-area-item">
<span class="help-area-graphic help-area-graphic--solid">
<span class="help-area-resize-icon help-area-resize-icon--nw"></span>
<span class="help-area-resize-icon help-area-resize-icon--n"></span>
<span class="help-area-resize-icon help-area-resize-icon--ne"></span>
<span class="help-area-resize-icon help-area-resize-icon--e"></span>
<span class="help-area-resize-icon help-area-resize-icon--se"></span>
<span class="help-area-resize-icon help-area-resize-icon--s"></span>
<span class="help-area-resize-icon help-area-resize-icon--sw"></span>
<span class="help-area-resize-icon help-area-resize-icon--w"></span>
</span>
<p class="help-area-text">Drag border handles to resize.</p>
</div>
<div class="help-area-item help-area-item--lower">
<span class="help-area-graphic help-area-graphic--solid">
<span class="help-area-rotate-handle"></span>
</span>
<p class="help-area-text">Drag the rotate handle to rotate.</p>
</div>
<div class="help-area-item">
<span class="help-area-graphic help-area-graphic--solid">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/background.svg"
class="help-area-snap-background-icon">
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/pointer.svg"
class="help-area-snap-pointer-icon">
</span>
<p class="help-area-text">Double click to snap element dimensions to a background sprite.</p>
</div>
<div class="help-area-item">
<span class="help-area-graphic help-area-graphic--dashed">
<span class="help-area-drag-box--one"></span>
<span class="help-area-drag-box--two"></span>
<img src="chrome-extension://__MSG_@@extension_id__/images/icons/pointer.svg"
class="help-area-drag-pointer-icon">
</span>
<p class="help-area-text">Drag to select multiple elements.</p>
</div>
</div>
<div class="help-area-block help-area-block--commands">
<h3 class="help-area-header">Commands</h3>
<p class="help-area-item">
<span class="help-area-key-combo">
<span class="key-icon key-icon--large">
<span class="key-icon--mac">⌘</span>
<span class="key-icon--win">⌃</span>
</span>
<span class="">+</span>
<span class="key-icon key-icon--large">z</span>
</span>
<span class="help-area-text">Undo</span>
</p>
<p class="help-area-item">
<span class="help-area-key-combo">
<span class="key-icon key-icon--large">
<span class="key-icon--mac">⌘</span>
<span class="key-icon--win">⌃</span>
</span>
<span class="">+</span>
<span class="key-icon key-icon--large">a</span>
</span>
<span class="help-area-text">Select All</span>
</p>
<p class="help-area-item">
<span class="help-area-key-combo">
<span class="key-icon key-icon--large">
<span class="key-icon--mac">⌘</span>
<span class="key-icon--win">⌃</span>
</span>
<span class="">+</span>
<span class="key-icon key-icon--large">c</span>
</span>
<span class="help-area-text">Copy Styles</span>
</p>
<span class="help-area-item">
<span class="help-area-key-combo">
<span class="key-icon key-icon--large">
<span class="key-icon--mac">⌘</span>
<span class="key-icon--win">⌃</span>
</span>
<span class="">+</span>
<span class="key-icon key-icon--large">s</span>
</span>
<span class="help-area-text">Save Styles</span>
</span>
</div>
</div>
</div>
</div>
<div class="control-panel-area control-panel-area--quickstart" id="quickstart-area">
<div class="quickstart-block quickstart-block--mouse">
<img class="quickstart-image" src="chrome-extension://__MSG_@@extension_id__/images/icons/mouse.svg">
<p>Use the mouse to drag, resize, and rotate elements.</p>
</div>
<div class="quickstart-block quickstart-block--keyboard">
<img class="quickstart-image" src="chrome-extension://__MSG_@@extension_id__/images/icons/keyboard.svg">
<p>Arrow keys nudge elements.<br>
<span class="key-icon">m</span>
<span class="key-icon">s</span>
<span class="key-icon">b</span>
change nudge modes.</p>
</div>
<div class="quickstart-block quickstart-block--background">
<img class="quickstart-image" src="chrome-extension://__MSG_@@extension_id__/images/icons/background.svg">
<p>Double click on a background image to fit sprite dimensions.</p>
</div>
<div class="quickstart-block quickstart-block--output">
<img class="quickstart-image" src="chrome-extension://__MSG_@@extension_id__/images/icons/download.svg">
<p>
<span class="key-icon">
<span class="key-icon--mac">⌘</span>
<span class="key-icon--win">⌃</span>
</span>
<span class="key-icon">c</span>
Copy styles to clipboard<br>
<span class="key-icon">
<span class="key-icon--mac">⌘</span>
<span class="key-icon--win">⌃</span>
</span>
<span class="key-icon">s</span>
Save styles to disk
</p>
</div>
<div class="vertical-line"></div>
<div class="horizontal-line"></div>
<span id="quickstart-skip-link" class="quickstart-skip-link">Don't Show</span>
</div>
</div>
<div id="drag-selection" class="drag-selection">
<div class="drag-selection-border drag-selection-top"></div>
<div class="drag-selection-border drag-selection-right"></div>
<div class="drag-selection-border drag-selection-bottom"></div>
<div class="drag-selection-border drag-selection-left"></div>
</div>
<div id="loading-animation" class="loading-animation">
<div class="loading-graphic">
<div class="loading-spin">
<div class="loading-bar loading-bar-1"></div>
<div class="loading-bar loading-bar-2"></div>
<div class="loading-bar loading-bar-3"></div>
<div class="loading-bar loading-bar-4"></div>
<div class="loading-bar loading-bar-5"></div>
<div class="loading-bar loading-bar-6"></div>
<div class="loading-bar loading-bar-7"></div>
<div class="loading-bar loading-bar-8"></div>
<div class="loading-bar loading-bar-9"></div>
<div class="loading-bar loading-bar-10"></div>
<div class="loading-bar loading-bar-11"></div>
<div class="loading-bar loading-bar-12"></div>
</div>
</div>
<div class="loading-shade"></div>
</div>
<div id="copy-animation" class="copy-animation">
<div id="copy-animation-copied" class="copy-animation-text">Copied!</div>
<div id="copy-animation-no-styles" class="copy-animation-text">No Styles</div>
</div>