[wp-trac] [WordPress Trac] #45782: Images in blocks auto left align when centre align selected

WordPress Trac noreply at wordpress.org
Tue Jul 27 18:56:40 UTC 2021


#45782: Images in blocks auto left align when centre align selected
-------------------------------+------------------------------
 Reporter:  lifeadventurers    |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Editor             |     Version:  5.0.2
 Severity:  normal             |  Resolution:
 Keywords:  2nd-opinion close  |     Focuses:
-------------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:   => 2nd-opinion close


Comment:

 The Cubic theme does not center caption text, either on the front end or
 in the editor (with the optional theme.css). Yet the editor uses `text-
 align: center` for the entire image block when choosing center alignment.
 However, I do not think the editor should enforce that same style on the
 public side.

 If you want the image captions centered on the front end, you could add
 one of the following lines to the Additional CSS (in Appearance >
 Customize).
 A. For all image block captions:
 {{{
 .wp-block-image figcaption {text-align: center;}
 }}}
 B. For captions in center-aligned image blocks:
 {{{
 .wp-block-image .aligncenter {text-align: center;}
 }}}

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


More information about the wp-trac mailing list