Block-image Caption Does Not Center for images < 608px #5834
Labels
[Feature] Media
Anything that impacts the experience of managing media
[Type] Bug
An existing feature does not function as intended
Issue Overview
This is for Gutenberg Version 2.4.0
The wp-block-image caption apparently is meant to be centered under the image. If the image is less than 608px wide (at least in my tests, 608px seems to be the maximum width for wp-block-image width), then the caption is not properly centered. This non-centering can be seen in both the editor view, and in the front-end view for most themes.
Steps to Reproduce (for bugs)
Expected Behavior
The wp-block-image caption should always center under the image, no matter what the width is.
Current Behavior
Possible Solution
This seems to be related to the display:block on the wp-block-image styling. Changing the style to
.wp-block-image { display: inline-block !important; }
will fix the centering in both the visual editor and the front-end view. BUT, that leaves an undesirable side effect in that a pair of narrow enough images will not break in the front-end view (they display side by side), but do in the editor because it has some other wrapping blocks that cause a break in the editor DOM version.
Screenshots / Video
Related Issues and/or PRs
Todos
The text was updated successfully, but these errors were encountered: