Skip to content

Commit

Permalink
Fix various image width problems
Browse files Browse the repository at this point in the history
This fixes #3945 and #5213. It is a new PR that is meant to replace #5209. This PR is a work in progress.
  • Loading branch information
Joen Asmussen committed Apr 4, 2018
1 parent a81e0dc commit 418342d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
1 change: 1 addition & 0 deletions blocks/library/image/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.wp-block-image {
width: fit-content;
figcaption {
margin-top: 0.5em;
color: $dark-gray-300;
Expand Down
15 changes: 0 additions & 15 deletions editor/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -273,21 +273,6 @@
}
}

// Apply max-width to floated items that have no intrinsic width, like Cover Image or Gallery
&[data-align="left"],
&[data-align="right"] {
> .editor-block-list__block-edit {
max-width: 360px;
width: 100%;
}

// reset when data-resized
&[data-resized="true"] > .editor-block-list__block-edit {
max-width: none;
width: auto;
}
}

// Left
&[data-align="left"] {
.editor-block-list__block-edit { // This is in the editor only, on the frontend, the img should be floated
Expand Down

0 comments on commit 418342d

Please sign in to comment.