[wp-trac] [WordPress Trac] #54076: Twenty Twenty: image not centered

WordPress Trac noreply at wordpress.org
Mon Sep 6 17:54:21 UTC 2021


#54076: Twenty Twenty: image not centered
----------------------------------------+----------------------------
 Reporter:  damienaa                    |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  5.8.2
Component:  Bundled Theme               |     Version:  5.8
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  css, template
----------------------------------------+----------------------------

Comment (by mukesh27):

 Hi there!

 In Twenty Twenty, `is-resized` class added in `figure` so if we add
 `margin` on that element it will not centered the image. To make image as
 center we should use below CSS.

 {{{
 .wp-block-image.is-resized img {
         margin-left: auto;
         margin-right: auto;
 }
 }}}

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


More information about the wp-trac mailing list