[wp-trac] [WordPress Trac] #45616: Image captions don't display in a line but just one word in a line
WordPress Trac
noreply at wordpress.org
Thu Dec 13 09:29:54 UTC 2018
#45616: Image captions don't display in a line but just one word in a line
--------------------------+-----------------------------
Reporter: stramm | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: minor | Keywords:
Focuses: |
--------------------------+-----------------------------
When adding an image with description to a post (in Gutenberg) and
aligning it left or right, setting medium size and a link to the media,
the caption (text between <figcaption>''text''</figcaption>) renders on
the final page in all browsers I've tested not in one line using the width
of the entire image above but each word of the caption uses one separarte
line.
I tried to modify /wp-includes/css/dist/block-libraray/style.min.css and
changed
{{{
.wp-block-image .aligncenter>figcaption,.wp-block-image
.alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-
image.is-resized>figcaption{display:table-caption;caption-side:bottom}
}}}
to
{{{
.wp-block-image .aligncenter>figcaption,.wp-block-image
.alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-
image.is-resized>figcaption{display:table-caption;caption-
side:bottom;width:100%}
}}}
That fixed the problem for me if I add text next to the image. If however
no text gets added, the caption spans over the entire site width and not
only the image size.
Thanks,
Thomas
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45616>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list