[wp-trac] [WordPress Trac] #42700: Figure captions not inheriting max-width from figures

WordPress Trac noreply at wordpress.org
Mon Dec 11 12:57:09 UTC 2017


#42700: Figure captions not inheriting max-width from figures
-------------------------------------------------+-------------------------
 Reporter:  bahead                               |       Owner:  desrosj
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Media                                |  Review
 Severity:  normal                               |     Version:  4.9
 Keywords:  needs-screenshots reporter-feedback  |  Resolution:
                                                 |     Focuses:
-------------------------------------------------+-------------------------

Comment (by bahead):

 It appears this "bug" is theme or plugin related, not to WP core, so this
 ticket should be withdrawn. While multiple users have reported this issue
 with their sites after upgrading to v4.9, I was unable to replicate the
 issue using Twenty Seventeen. I can only reproduce this issue using the
 Newspaper theme (see screenshot) when right-aligning images with long
 captions, and the problem only started happening with WP v4.9. I fixed
 this by modifying line 1586 in media.php to include the caption width:

 {{{
 . do_shortcode( $content ) . '<figcaption class="wp-caption-text" ' .
 $style . '>' . $atts['caption'] . '</figcaption></figure>';
 }}}

 This fix is probably unnecessary; I'm assuming there's a collision with
 theme CSS or a plug-in. I will need to do more investigation and
 troubleshooting on what element of the theme or plug-in is creating the
 problem, but I am withdrawing this ticket.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42700#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list