Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media & Text Block: Fix the "Crop image to fill entire column" option #20439

Merged
merged 2 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -161,7 +161,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