Skip to content

Commit

Permalink
Movers: Add bigger visible focus rectangle.
Browse files Browse the repository at this point in the history
This PR makes the focus rectangle the same size as the button itself.
  • Loading branch information
Joen A authored and jasmussen committed Aug 10, 2020
1 parent 39d5086 commit 5186ac6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
6 changes: 6 additions & 0 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,12 @@
&.is-down-button svg {
margin-bottom: 3px;
}

&:focus::before {
left: 0 !important;
min-width: 0;
width: calc(100% + #{ $border-width });
}
}
}
}
Expand Down
17 changes: 9 additions & 8 deletions packages/block-editor/src/components/block-mover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
// Focus style.
// Overrides .components-toolbar-group styles
&::before {
left: $grid-unit-10 !important;
right: $grid-unit-10 !important;
left: 0 !important;
right: 0 !important;
}
}

Expand All @@ -47,7 +47,7 @@
// Focus style.
&::before {
bottom: 0;
height: calc(100% - #{ $grid-unit-10 });
height: 100%;
}
}

Expand All @@ -60,7 +60,7 @@
// Focus style.
&::before {
top: 0;
height: calc(100% - #{ $grid-unit-10 });
height: 100%;
}
}

Expand All @@ -76,8 +76,8 @@

// Focus style.
&::before {
top: $grid-unit-10;
bottom: $grid-unit-10;
top: 0;
bottom: 0;
min-width: 0;
width: auto;
height: auto;
Expand All @@ -95,7 +95,7 @@
// Focus style.
// Overrides .components-toolbar-group styles
&::before {
left: $grid-unit-10 !important;
left: 0 !important;
right: 0 !important;
}
}
Expand All @@ -111,7 +111,8 @@
// Overrides .components-toolbar-group styles
&::before {
left: 0 !important;
right: $grid-unit-10 !important;
right: 0 !important;
width: calc(100% + #{ $border-width });
}
}
}
Expand Down

0 comments on commit 5186ac6

Please sign in to comment.