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

Block Toolbar: Fix text only label for locked blocks #50944

Merged
merged 1 commit into from
Jun 13, 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: 11 additions & 4 deletions packages/block-editor/src/components/block-lock/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,17 @@
.block-editor-block-lock-toolbar {
.components-button.has-icon {
min-width: $button-size-small + $grid-unit-15 !important;
padding-left: 0 !important;
}
}

&:focus::before {
right: $grid-unit-10 !important;
}
Comment on lines -57 to -59
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hack for a narrow focus style, but it affected the text-only label. The default focus style looks good as well :)

CleanShot 2023-05-24 at 18 35 37

.block-editor-block-toolbar__block-controls .block-editor-block-lock-toolbar {
margin-left: -$grid-unit-15 * 0.5 !important;
}

.show-icon-labels {
.block-editor-block-toolbar__block-controls .block-editor-block-lock-toolbar {
border-left: 1px solid $gray-900;
margin-left: $grid-unit-15 * 0.5 !important;
margin-right: -$grid-unit-15 * 0.5;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@
}
}

.block-editor-block-lock-toolbar {
margin-left: -$grid-unit-15 * 0.5 !important;
}

// @todo: override toolbar group inherited paddings from components/block-tools/style.scss.
// This is best fixed by making the mover control area a proper single toolbar group.
.components-toolbar-group {
Expand Down