Skip to content

Commit

Permalink
Fix fixed toolbar in customize widgets (#51092)
Browse files Browse the repository at this point in the history
* override fixed block toolbar styles in the customize widgets editor

* show the collapse button and style collapsed block toolbar

* lower the z-index of the block toolbar in widgets customizer
  • Loading branch information
draganescu committed Jun 16, 2023
1 parent abc528d commit 474b550
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/customize-widgets/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,34 @@
.customize-widgets-popover {
@include reset;
}

/**
Fixed bloock toolbar overrides. We can't detect each editor instance
in the styles of the block editor component so we need to override
the fixed styles here because the breakpoint css does not fire in the
customizer's left panel.
*/
.block-editor-block-contextual-toolbar {
&.is-fixed {
position: sticky;
top: 0;
left: 0;
z-index: z-index(".block-editor-block-list__insertion-point");
width: calc(100% + 2 * 12px); //12px is the padding of customizer sidebar content

overflow-y: hidden;

border: none;
border-bottom: $border-width solid $gray-200;
border-radius: 0;

.block-editor-block-toolbar .components-toolbar-group,
.block-editor-block-toolbar .components-toolbar {
border-right-color: $gray-200;
}

&.is-collapsed {
margin-left: -12px; //12px is the padding of customizer sidebar content
}
}
}

1 comment on commit 474b550

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in 474b550.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5290918353
📝 Reported issues:

Please sign in to comment.