Skip to content

Commit

Permalink
Media & Text Block: Fix the "Crop image to fill entire column" option (
Browse files Browse the repository at this point in the history
…#20439)

* Use correct class name for media container element

* Rename media container class name for consistency
  • Loading branch information
WunderBart authored and jorgefilipecosta committed Mar 10, 2020
1 parent 190491d commit ece56ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/media-text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class MediaTextEdit extends Component {
} = attributes;
return (
<MediaContainer
className="block-library-media-text__media-container"
className="wp-block-media-text__media-container"
onSelectMedia={ this.onSelectMedia }
onWidthChange={ this.onWidthChange }
commitWidthChange={ this.commitWidthChange }
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/media-text/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@
max-width: unset;
}

figure.block-library-media-text__media-container {
figure.wp-block-media-text__media-container {
margin: 0;
height: 100%;
width: 100%;
}

.wp-block-media-text .block-library-media-text__media-container img,
.wp-block-media-text .block-library-media-text__media-container video {
.wp-block-media-text .wp-block-media-text__media-container img,
.wp-block-media-text .wp-block-media-text__media-container video {
vertical-align: middle;
width: 100%;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/media-text/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@
vertical-align: middle;
}

.wp-block-media-text.is-image-fill figure.wp-block-media-text__media {
.wp-block-media-text.is-image-fill figure.wp-block-media-text__media-container {
height: 100%;
min-height: 250px;
background-size: cover;
}

.wp-block-media-text.is-image-fill figure.wp-block-media-text__media > img {
.wp-block-media-text.is-image-fill figure.wp-block-media-text__media-container > img {
// The image is visually hidden but accessible to assistive technologies.
position: absolute;
width: 1px;
Expand Down

0 comments on commit ece56ae

Please sign in to comment.