Skip to content

Commit

Permalink
Fix sizing issue with placeholder and non resized images
Browse files Browse the repository at this point in the history
  • Loading branch information
Glen Davies committed Dec 6, 2021
1 parent 85e441a commit 27344a7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/block-library/src/image/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,25 @@ figure.wp-block-image:not(.wp-block) {
> .wp-block-image {
display: grid;
grid-template-rows: auto auto;
grid-template-columns: min-content;

grid-template-columns: [resized] min-content [no-resize] auto;
.components-placeholder {
grid-column: no-resize;
}
.components-resizable-box__container {
grid-column: resized;
}
> figcaption {
grid-column: resized;
display: table-caption;
caption-side: bottom;
}
}
> .wp-block-image:not(.is-resized) {
> .components-resizable-box__container,
> figcaption {
grid-column: no-resize;
}
}
}

.wp-block[data-align="left"] > .wp-block-image {
Expand Down

0 comments on commit 27344a7

Please sign in to comment.