[wp-trac] [WordPress Trac] #62864: Add padding and color changes to buttons and inputs

WordPress Trac noreply at wordpress.org
Wed Jan 29 09:46:45 UTC 2025


#62864: Add padding and color changes to buttons and inputs
-----------------------------------------------+---------------------------
 Reporter:  karmatosed                         |       Owner:  (none)
     Type:  enhancement                        |      Status:  new
 Priority:  normal                             |   Milestone:  6.8
Component:  Administration                     |     Version:
 Severity:  normal                             |  Resolution:
 Keywords:  needs-design-feedback needs-patch  |     Focuses:  ui,
                                               |  accessibility, css
-----------------------------------------------+---------------------------

Comment (by afercia):

 For some history and context: WordPress 5.3 brought in some relevant
 changes for form controls, buttons and the like that are very well
 summarized in the dev note that was published at that time by @audrasjb at
 https://make.wordpress.org/core/2019/10/18/noteworthy-admin-css-changes-
 in-wordpress-5-3/. Quoting from the dev note:

 > remove any fixed heights: flexible heights are the WordPress recommended
 standard (and one of the main goals of the Admin CSS changes)

 In fact, one of the most relevant changes for inputs and buttons was to
 remove any fixed height to allow text enlarged via the operating system
 user preferences or by other means to not be cut-off.

 Fixed heights should be avoided to allow text to still be fully visible.
 Previously, enlarged text was very problematic as illustrated in the
 attached screenshot pre-5.3.

 Also, vertical (top and bottom) padding should be avoided because,
 especially for inputs, it may partially cut-off text. That's the reason
 why in core the heights are determined via a unitless `line-height` value.
 This way, the inputs and buttons height scales together with the enlarged
 text. This mechanism should be preserved.

 Unfortunately, the block editor inputs and buttons use a fixed height.
 That's less than ideal and inconsistent with what Core does. Ideally,
 fixed heights should be removed from the block editor implementation.

 ReferencesL
 https://core.trac.wordpress.org/ticket/47477
 https://core.trac.wordpress.org/ticket/48420

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


More information about the wp-trac mailing list