Skip to content

Commit

Permalink
Fix: Block Movers disappear on middle breakpoints for full/wide block…
Browse files Browse the repository at this point in the history
…s. (#16579)

* Fix: Block Movers disappear on middle breakpoints for full/wide blocks.

* Update packages/block-editor/src/components/block-list/style.scss

Co-Authored-By: Kjell Reigstad <kjell.reigstad@automattic.com>
  • Loading branch information
jorgefilipecosta and kjellr authored Jul 15, 2019
1 parent c3d80db commit 7a06a10
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -439,19 +439,6 @@
float: left;
}

// Hide mover until wide breakpoints, or it might be covered by toolbar
&.is-multi-selected > .block-editor-block-mover,
> .block-editor-block-list__block-edit > .block-editor-block-mover {
display: none;
}

@include break-wide() {
&.is-multi-selected > .block-editor-block-mover,
> .block-editor-block-list__block-edit > .block-editor-block-mover {
display: block;
}
}

// Beyond the mobile breakpoint, wide images stretch outside of the column.
// To center the toolbar, we make it inline-flex so the toolbar is not full-wide.
@include break-small () {
Expand All @@ -464,6 +451,23 @@
.block-editor-block-mover.is-visible + .block-editor-block-list__breadcrumb {
top: (-$block-padding - $block-left-border-width - ($grid-size-small / 2));
}

// Align block toolbar to floated content.
@include break-mobile() {
.block-editor-block-toolbar {
/*!rtl:begin:ignore*/
left: $block-side-ui-width * 3 + ($grid-size-small * 1.5);
/*!rtl:end:ignore*/
}
}

@include break-xlarge() {
.block-editor-block-toolbar {
/*!rtl:begin:ignore*/
left: $block-padding;
/*!rtl:end:ignore*/
}
}
}

// Wide
Expand Down

0 comments on commit 7a06a10

Please sign in to comment.