Skip to content

Commit 5809145

Browse files
up1512001youknowriadbgardnertalldanafercia
authored andcommitted
fix: wp icon focus issue (WordPress#62675)
* fix: wp icon focus issue * update: shadow and added focus visible * Fix: editor focus style issue * Fix: svg dimentions & padding issue * Fix: border radius issue on editor focus ---- Co-authored-by: up1512001 <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: bgardner <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: afercia <[email protected]> Co-authored-by: jasmussen <[email protected]>
1 parent 594da78 commit 5809145

File tree

1 file changed

+26
-8
lines changed
  • packages/edit-site/src/components/layout

1 file changed

+26
-8
lines changed

packages/edit-site/src/components/layout/style.scss

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,11 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
175175
color: $white;
176176
}
177177

178+
&:focus-visible,
178179
&:focus {
179-
box-shadow: none;
180+
box-shadow: 0 0 0 3px #1e1e1e, 0 0 0 6px var(--wp-admin-theme-color);
181+
outline: 4px solid #0000;
182+
outline-offset: 4px;
180183
}
181184

182185
&::before {
@@ -193,13 +196,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
193196
box-shadow: none;
194197
}
195198

196-
// Lightened spot color focus.
197-
&:focus::before {
198-
box-shadow:
199-
inset 0 0 0 var(--wp-admin-border-width-focus) rgba($white, 0.1),
200-
inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
201-
}
202-
203199
.edit-site-layout__view-mode-toggle-icon {
204200
display: flex;
205201
height: $grid-unit-80;
@@ -255,3 +251,25 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
255251
padding-left: 16px;
256252
padding-right: 16px;
257253
}
254+
255+
.edit-site-layout.is-full-canvas {
256+
.edit-site-layout__view-mode-toggle.components-button {
257+
&:focus-visible,
258+
&:focus {
259+
260+
box-shadow: none;
261+
outline: none;
262+
outline-offset: 0;
263+
264+
.edit-site-site-icon svg {
265+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #3858e9);
266+
outline: 3px solid #0000;
267+
height: 40px;
268+
width: 40px;
269+
padding: 2px;
270+
border-radius: 2px;
271+
}
272+
273+
}
274+
}
275+
}

0 commit comments

Comments
 (0)