diff --git src/wp-includes/css/customize-preview.css src/wp-includes/css/customize-preview.css
index a388488..1bab796 100644
|
|
|
12 | 12 | } |
13 | 13 | |
14 | 14 | /* Make shortcut buttons essentially invisible */ |
15 | | .widget button.customize-partial-edit-shortcut, |
| 15 | .widget .customize-partial-edit-shortcut, |
16 | 16 | .customize-partial-edit-shortcut { |
17 | 17 | position: relative; |
18 | 18 | float: left; |
… |
… |
|
28 | 28 | z-index: 5; |
29 | 29 | } |
30 | 30 | |
31 | | .customize-partial-edit-shortcut:active { |
| 31 | .widget .customize-partial-edit-shortcut button:active, |
| 32 | .customize-partial-edit-shortcut button:active { |
32 | 33 | padding: 0; |
33 | 34 | border: 0; |
34 | 35 | } |
35 | 36 | |
36 | 37 | /* Styles for the actual shortcut */ |
37 | | .customize-partial-edit-shortcut:before { |
| 38 | .widget .customize-partial-edit-shortcut button, |
| 39 | .customize-partial-edit-shortcut button { |
38 | 40 | position: absolute; |
39 | 41 | left: -36px; |
40 | 42 | color: #fff; |
41 | | width: 30px; |
42 | | height: 30px; |
| 43 | min-width: 30px; |
| 44 | min-height: 30px; |
43 | 45 | font-size: 18px; |
44 | | font-family: dashicons; |
45 | | content: '\f464'; |
46 | 46 | z-index: 5; |
47 | 47 | background-color: #0085ba; |
| 48 | background: #0085ba; |
48 | 49 | border-radius: 50%; |
49 | 50 | border: 2px solid #fff; |
50 | 51 | box-shadow: 0 2px 1px rgba(46,68,83,0.15); |
… |
… |
|
65 | 66 | -1px 0 1px #006799; |
66 | 67 | } |
67 | 68 | |
68 | | .customize-partial-edit-shortcut:hover:before, |
69 | | .customize-partial-edit-shortcut:focus:before { |
| 69 | .customize-partial-edit-shortcut button svg { |
| 70 | fill: #fff; |
| 71 | min-width: 20px; |
| 72 | min-height: 20px; |
| 73 | } |
| 74 | |
| 75 | .customize-partial-edit-shortcut button:hover, |
| 76 | .customize-partial-edit-shortcut button:focus { |
70 | 77 | background: #008ec2; /* matches primary buttons */ |
71 | 78 | border-color: #191e23; /* provides visual focus style with 4.5 contrast against background color */ |
72 | 79 | } |
73 | 80 | |
74 | | body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut:before { |
| 81 | body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button { |
75 | 82 | animation-name: customize-partial-edit-shortcut-bounce-appear; |
76 | 83 | pointer-events: auto; |
77 | 84 | } |
78 | | body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut:before { |
| 85 | body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button { |
79 | 86 | animation-name: customize-partial-edit-shortcut-bounce-disappear; |
80 | 87 | pointer-events: none; |
81 | 88 | } |
82 | 89 | |
83 | | body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut:before { |
| 90 | body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut button { |
84 | 91 | animation-duration: 1.5s; |
85 | 92 | animation-delay: 0.4s; |
86 | 93 | animation-name: customize-partial-edit-shortcut-bounce-disappear; |
87 | 94 | pointer-events: none; |
88 | 95 | } |
89 | 96 | |
90 | | .page-sidebar-collapsed .customize-partial-edit-shortcut:before, |
91 | | .customize-partial-edit-shortcut-hidden:before { |
| 97 | .page-sidebar-collapsed .customize-partial-edit-shortcut button, |
| 98 | .customize-partial-edit-shortcut-hidden .customize-partial-edit-shortcut button { |
92 | 99 | visibility: hidden; |
93 | 100 | } |
94 | 101 | |
95 | | .customize-partial-edit-shortcut-left-margin:before { |
| 102 | .customize-partial-edit-shortcut-left-margin .customize-partial-edit-shortcut button { |
96 | 103 | left: 0; |
97 | 104 | } |
98 | 105 | |
… |
… |
body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut:bef |
151 | 158 | } |
152 | 159 | |
153 | 160 | @media screen and (max-width:800px) { |
154 | | .customize-partial-edit-shortcut:before { |
| 161 | .customize-partial-edit-shortcut button { |
155 | 162 | left: -18px; /* Assume there will be less of a margin available on smaller screens */ |
156 | 163 | } |
157 | 164 | } |
diff --git src/wp-includes/js/customize-selective-refresh.js src/wp-includes/js/customize-selective-refresh.js
index 0fc06e9..d4523d9 100644
|
|
wp.customize.selectiveRefresh = ( function( $, api ) { |
214 | 214 | * @return {jQuery} The edit shortcut button element. |
215 | 215 | */ |
216 | 216 | createEditShortcut: function() { |
217 | | var partial = this, shortcutTitle; |
| 217 | var partial = this, shortcutTitle, $buttonContainer, $button, $image; |
218 | 218 | shortcutTitle = partial.getEditShortcutTitle(); |
219 | | return $( '<button>', { |
| 219 | $buttonContainer = $( '<span>', { |
| 220 | 'class': 'customize-partial-edit-shortcut ' + partial.getEditShortcutClassName() |
| 221 | } ); |
| 222 | $button = $( '<button>', { |
220 | 223 | 'aria-label': shortcutTitle, |
221 | 224 | 'title': shortcutTitle, |
222 | | 'type': 'button', |
223 | | 'class': 'customize-partial-edit-shortcut ' + partial.getEditShortcutClassName() |
| 225 | 'class': 'customize-partial-edit-shortcut-button' |
224 | 226 | } ); |
| 227 | $image = $( '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"/></svg>' ); |
| 228 | $button.append( $image ); |
| 229 | $buttonContainer.append( $button ); |
| 230 | return $buttonContainer; |
225 | 231 | }, |
226 | 232 | |
227 | 233 | /** |