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

Fix fixed toolbar in customize widgets #51092

Merged
merged 3 commits into from
Jun 16, 2023
Merged
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
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
}
}
}