[wp-trac] [WordPress Trac] #56181: Video alignment off - items aligned left when they should align center

WordPress Trac noreply at wordpress.org
Sun Jul 10 05:49:15 UTC 2022


#56181: Video alignment off - items aligned left when they should align center
----------------------------+------------------------------
 Reporter:  justinclemente  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  close           |     Focuses:
----------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:   => close


Comment:

 Thanks for the report! Welcome to WordPress Trac!

 This might have fit better in the [https://wordpress.org/support/forums/
 support forums]. I could not figure out how you have these margins added
 at the end of the global styles:
 {{{
 .wp-block-audio{margin: 0 0 1em 0;}
 .wp-block-table > table{margin: 0 0 1em 0;}
 .wp-block-video{margin: 0 0 1em 0;}
 .wp-block-embed{margin: 0 0 1em 0;}
 }}}

 Your theme is apparently Twenty Twenty (or a child theme based on it).

 As a quick fix, to override the styles above for any of these blocks that
 you choose to center, you could go to the Customizer and find Additional
 CSS. Then paste the following and click Publish:
 {{{
 figure.aligncenter {
   margin-left: auto;
   margin-right: auto;
 }
 }}}

 Or if you always want these blocks centered, without choosing the
 alignment from the block toolbar, you could use this:
 {{{
 .wp-block-audio,
 .wp-block-video,
 .wp-block-embed {
   margin-left: auto;
   margin-right: auto;
 }
 }}}

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


More information about the wp-trac mailing list