File tree 3 files changed +28
-4
lines changed
3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 8
8
export let onSave
9
9
10
10
const VALIDATION_ANIMATION_DURATION = 700
11
+ const DOWNLOAD_MINIFIED_CSS = " Download minified css"
12
+ const COPY_MINIFIED_CSS = " Copy minified css to clipboard"
13
+
11
14
let isSavedToClipboard = false
12
15
let isSaved = false
13
16
31
34
</script >
32
35
33
36
<div class ={` d-flex ${className } copy-save-actions ` }>
34
- <button class ="btn btn-link p-1" on:click ={saveToClipboard }>
37
+ <button
38
+ class =" btn btn-link p-1"
39
+ title ={COPY_MINIFIED_CSS }
40
+ aria-label ={COPY_MINIFIED_CSS }
41
+ on:click ={saveToClipboard }
42
+ >
35
43
<Icon name ={isSavedToClipboard ? ' check' : ' clipboard' }/>
36
44
</button >
37
- <button class ="btn btn-link p-1 ms-1" on:click ={save }>
45
+ <button
46
+ class =" btn btn-link p-1 ms-1"
47
+ title ={DOWNLOAD_MINIFIED_CSS }
48
+ aria-label ={DOWNLOAD_MINIFIED_CSS }
49
+ on:click ={save }
50
+ >
38
51
<Icon name ={isSaved ? ' check' : ' download' }/>
39
52
</button >
40
53
</div >
Original file line number Diff line number Diff line change 4
4
export { className as class }
5
5
</script >
6
6
7
- <span class ={` fw-lighter fst-italic ${className } ` }> - saved {size / 1000 } kB</span >
7
+ <span
8
+ class ={` fw-lighter fst-italic ${className } ` }
9
+ aria-live =" polite"
10
+ >
11
+ - saved {size / 1000 } kB
12
+ </span >
Original file line number Diff line number Diff line change 46
46
</button >
47
47
48
48
<div id =" result" class =" position-relative ms-2 flex-grow-1 d-flex p-0 align-items-center" style =" width: 0;" >
49
- <input class ="form-control" type ="text" disabled ={optimizedInput === undefined } bind:value ={optimizedInput }>
49
+ <input
50
+ type =" text"
51
+ class =" form-control"
52
+ aria-hidden ={true }
53
+ disabled ={optimizedInput === undefined }
54
+ bind:value ={optimizedInput }
55
+ >
50
56
{#if optimizedInput !== undefined }
51
57
<SavedSizeBadge size ={savedSize } class =" text-nowrap ms-2" />
52
58
<CopySaveActions
You can’t perform that action at this time.
0 commit comments