Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top toolbar: Fix issues with save button overlap, and plugin buttons #53101

Merged
merged 2 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions packages/block-editor/src/components/block-tools/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,18 @@
display: none;
}

// Add a scrim to the right of the collapsed button.
&.is-collapsed::after {
content: "";
position: absolute;
left: 100%;
width: $grid-unit-60;
height: 100%;
background: linear-gradient(to right, $white, transparent);
}

// on desktop and tablet viewports the toolbar is fixed
// on top of interface header

@include break-medium() {
&.is-fixed {

Expand Down Expand Up @@ -308,7 +317,7 @@
}
}

// on tablet vewports the toolbar is fixed
// on tablet viewports the toolbar is fixed
// on top of interface header and covers the whole header
// except for the inserter on the left
@include break-medium() {
Expand All @@ -328,7 +337,7 @@
// in full screen mode we need to account for
// the combined with of the tools at the right of the header and the margin left
// of the toolbar which includes four buttons
width: calc(100% - 240px - #{4 * $grid-unit-80});
width: calc(100% - 280px - #{4 * $grid-unit-80});
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
align-items: center;
padding-left: $grid-unit-10;

// Some plugins add buttons here despite best practices.
// Push them a bit rightwards to fit the top toolbar.
margin-right: $grid-unit-10;

@include break-small() {
padding-left: $grid-unit-30;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
border-radius: 4px;
width: min(100%, 450px);

// Make the document title shorter in top-toolbar mode, as it has to be covered.
.has-fixed-toolbar & {
width: min(100%, 380px);
}

.components-button {
&:hover {
color: var(--wp-block-synced-color);
Expand Down