[wp-trac] [WordPress Trac] #56554: Twenty Eleven: Width issue in Button block

WordPress Trac noreply at wordpress.org
Wed Mar 22 00:07:03 UTC 2023


#56554: Twenty Eleven: Width issue in Button block
-------------------------------------+-------------------------------------
 Reporter:  kajalgohel               |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Bundled Theme            |     Version:  6.0.2
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch dev-         |     Focuses:  ui, css,
  feedback                           |  administration
-------------------------------------+-------------------------------------
Changes (by samuelpress):

 * keywords:  needs-patch => needs-patch dev-feedback


Comment:

 I am able to reproduce this on WordPress version 6.1.1 running the twenty
 eleven theme. [https://share.getcloudapp.com/bLuleNQD]

 It seems in older themes, the block button was centered by introducing a
 wrapper element to apply the alignment
 [https://github.com/WordPress/gutenberg/blob/trunk/packages/block-
 editor/src/components/block-list/block.js#L182].

 Here we have the css that applies the width styles to the block
 [https://github.com/WordPress/gutenberg/blob/trunk/packages/block-
 library/src/button/style.scss#L41], the css doesn't work because of the
 specificity.

 An easy way to fix it would be to add another declaration that takes the
 wrapper element into account. Unless there's something I'm missing.

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


More information about the wp-trac mailing list