[wp-trac] [WordPress Trac] #58526: Twenty Fifteen: Button Letter Case is Not Working

WordPress Trac noreply at wordpress.org
Wed Jun 14 18:52:48 UTC 2023


#58526: Twenty Fifteen: Button Letter Case is Not Working
---------------------------+------------------------------
 Reporter:  thakordarshil  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:  6.2.2
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  css
---------------------------+------------------------------

Comment (by sabernhardt):

 58526.diff could fix blocks where the user chose something other than
 uppercase, but it also changes **every other** Button block created with
 this theme.

 The Letter Case control does not work in //any// theme that assigns a
 `text-transform` property to the `.wp-block-button__link` element,
 including:
 - Twenty Fourteen
 - Twenty Fifteen
 - Twenty Sixteen
 - Twenty Twenty

 The [https://github.com/WordPress/gutenberg/blob/trunk/packages/block-
 library/src/button/style.scss default Button block styles] probably could
 add the following to ensure support in any theme:
 {{{
 .wp-block-buttons[style*="text-transform"] .wp-block-button__link,
 .wp-block-button[style*="text-transform"] .wp-block-button__link {
         text-transform: inherit;
 }
 }}}

 Both selectors are necessary. The `text-transform` style is added to `.wp-
 block-buttons` when the Buttons block only has one Button block; multiple
 Button blocks in the same Buttons block get their own style attribute on
 the `.wp-block-button` container.

 In case all themes that use uppercase should support the user control
 individually, I can add that to a patch for the bundled themes.

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


More information about the wp-trac mailing list