Skip to content

Commit

Permalink
Post Editor Header: Make block toolbar toggle button focus visible (W…
Browse files Browse the repository at this point in the history
…ordPress#59781)

* Post Editor Header: Make block toolbar toggle button focus visible

* Use CSS variable

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
  • Loading branch information
3 people authored and cbravobernal committed Apr 9, 2024
1 parent 29e050b commit 5299bc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/edit-post/src/components/header/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
// Leave enough room for the focus ring to show.
padding: 2px 0;
align-items: center;
// Allow focus ring to be fully visible on furthest right button.
@include break-medium() {
padding-right: var(--wp-admin-border-width-focus);
}

.table-of-contents {
display: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
height: 100%;
// Allow focus ring to be fully visible on furthest right button.
@include break-medium() {
padding-right: var(--wp-admin-border-width-focus);
// Account for the site hub, which is 60x60px.
flex-basis: calc(37.5% - 60px);
padding-right: 2px;
// We need this to be overflow hidden so the block toolbar can
// overflow scroll. If the overflow is visible, flexbox allows
// the toolbar to grow outside of the allowed container space.
Expand Down

0 comments on commit 5299bc3

Please sign in to comment.