-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Customizer: Implement mobile responsive block toolbar (#31589)
* Make the block toolbar sticky and add some styles for the editor topbar * Set top position * Update z-indices and responsive margins * Remove sticky positioning from topbar
- Loading branch information
Showing
4 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/customize-widgets/src/components/header/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 15 additions & 2 deletions
17
packages/customize-widgets/src/components/sidebar-block-editor/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
.block-editor-block-contextual-toolbar.is-fixed { | ||
// The top position used for the 'sticky' positioning. | ||
top: 0; | ||
|
||
// Offset the customizer's sidebar padding. | ||
margin-left: -$grid-unit-15; | ||
margin-right: -$grid-unit-15; | ||
width: calc(100% + #{ $grid-unit-30 }); | ||
|
||
// Scroll sideways. | ||
overflow-y: auto; | ||
z-index: z-index(".customize-widgets__block-toolbar"); | ||
} | ||
|
||
.customize-control-sidebar_block_editor .block-editor-block-list__block-popover { | ||
position: fixed; | ||
// Appear over block placeholders, but under widgets page headings. | ||
z-index: 8; | ||
z-index: z-index(".customize-widgets__block-toolbar"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
// Adds a white background to the block based widget section. | ||
// #customize-theme-controls id is required to add specificity. | ||
#customize-theme-controls .customize-widgets__sidebar-section { | ||
// Additional ids and class names are used in the selector for | ||
// added specificity. | ||
#customize-theme-controls .customize-pane-child.customize-widgets__sidebar-section { | ||
// Override the default 'overflow' to allow the | ||
// editor toolbars to be sticky. | ||
overflow: unset; | ||
|
||
// Make the entire sidebar background white. | ||
min-height: 100%; | ||
background-color: $white; | ||
} |