Skip to content

Commit

Permalink
Fix wide regression (#10228)
Browse files Browse the repository at this point in the history
* Fix wide regression

This fixes a regression where wide images would cause horizontal scrollbars. Try the demo content, for example.

I will investigate why this regression happened, I suspect it was related to the side-padding normalization.

* Fix figure horizontal margin regression.
  • Loading branch information
jasmussen authored Sep 28, 2018
1 parent 3eacbf9 commit dff799b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/block-library/src/image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
width: 100%;
}

// This resets the intrinsic margin on the figure in non-floated, wide, and full-wide alignments.
margin-left: 0;
margin-right: 0;

// Floats get an extra wrapping <aside> element, so the <figure> becomes a child.
.alignleft,
.alignright,
Expand Down
1 change: 0 additions & 1 deletion packages/editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@

// Full-wide
&[data-align="full"] {

// Position hover label on the right
> .editor-block-list__breadcrumb {
right: -$border-width;
Expand Down

0 comments on commit dff799b

Please sign in to comment.