[wp-trac] [WordPress Trac] #47290: Image can’t align center inside block column

WordPress Trac noreply at wordpress.org
Wed Jul 24 07:39:46 UTC 2019


#47290: Image can’t align center inside block column
---------------------------+------------------------------
 Reporter:  hklcf          |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  ui, template
---------------------------+------------------------------
Changes (by garrett-eclipse):

 * component:  Editor => Bundled Theme


Comment:

 Thanks for the report @hklcf I was able to reproduce this with a clean
 install of WP using the Twenty Nineteen theme.

 Upon inspect I found the theme CSS sets a calculated width on the centered
 figure element surrounding the image. This causes the element to extend
 beyond the bounds of the column causing it's centered child image to be
 displaced out of the column.

 Setting to 100% width when in a column block seems to resolve the issue
 but should be looked at in the bundled theme where this is applied.

 I believe this is the SCSS which controls that width in the theme CSS;
 https://github.com/WordPress/WordPress/blob/master/wp-
 content/themes/twentynineteen/sass/blocks/_blocks.scss#L533-L553

 Moving into the Bundled Theme component for further review.

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


More information about the wp-trac mailing list