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

Image block vertically stretched #8

Closed
bobbingwide opened this issue Jul 4, 2021 · 2 comments
Closed

Image block vertically stretched #8

bobbingwide opened this issue Jul 4, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bobbingwide
Copy link
Owner

In these screen captures the image block is being vertically stretched.
The featured image is OK.
Explain.

image

image

@bobbingwide bobbingwide added the bug Something isn't working label Jul 4, 2021
@bobbingwide bobbingwide self-assigned this Jul 4, 2021
@bobbingwide
Copy link
Owner Author

This appears to be the same problem as bobbingwide/thisis#13
Easy to test, apply the same fix.

/**
Add CSS to prevent large and full sized images from losing their aspect ratio 
 */
 .wp-block-image img {
	height: auto;
}

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 5, 2021

I get a similar problem with the image in a media & text block. The generated CSS is...

.wp-block-media-text__media img, .wp-block-media-text__media video {
    max-width: unset;
    width: 100%;
    vertical-align: middle;
}

Adding height: auto; to the style corrects this behaviour as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant