Skip to content

Commit 4befe31

Browse files
committed
independently customise fixed top toolbar for the customizer editor
1 parent 7b5d460 commit 4befe31

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

packages/block-editor/src/components/block-tools/block-contextual-toolbar.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,6 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
9292
return;
9393
}
9494

95-
// bail if we're in the customizer
96-
if ( document.body.classList.contains( 'wp-customizer' ) ) {
97-
return;
98-
}
99-
10095
const blockToolbar = document.querySelector(
10196
'.block-editor-block-contextual-toolbar'
10297
);

packages/block-editor/src/components/block-tools/style.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,6 @@
203203
& > .block-editor-block-toolbar__group-collapse-fixed-toolbar {
204204
border: none;
205205

206-
.wp-customizer & {
207-
// In the customizer, the collapse button is not shown.
208-
display: none;
209-
}
210-
211206
.show-icon-labels & {
212207
.components-button.has-icon {
213208
// Hide the button icons when labels are set to display...

packages/customize-widgets/src/components/sidebar-block-editor/style.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
// Offset the customizer's sidebar padding.
66
margin-left: -$grid-unit-15;
77
margin-right: -$grid-unit-15;
8-
width: calc(100% + #{ $grid-unit-30 });
8+
// added important to override the inline style coming from
9+
// the block-editor/block-contextual-toolbar component.
10+
width: calc(100% + #{ $grid-unit-30 }) !important;
11+
12+
& > .block-editor-block-toolbar__group-collapse-fixed-toolbar {
13+
display: none;
14+
}
915

1016
// Scroll sideways.
1117
overflow-y: auto;

0 commit comments

Comments
 (0)