[wp-trac] [WordPress Trac] #63878: Backport: add support for text inputs on the elements API

WordPress Trac noreply at wordpress.org
Tue Oct 21 12:38:30 UTC 2025


#63878: Backport: add support for text inputs on the elements API
-------------------------------------------------+-------------------------
 Reporter:  onemaggie                            |       Owner:  scruffian
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.9
Component:  Themes                               |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-testing gutenberg-   |     Focuses:
  merge                                          |
-------------------------------------------------+-------------------------
Changes (by scruffian):

 * owner:  (none) => scruffian
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61023" 61023]:
 {{{
 #!CommitTicketReference repository="" revision="61023"
 Editor: Add support for text inputs to theme.json.

 Adds support for text input elements to theme.json so that theme builders
 and extenders can be style text input elements consistently.

 Text input elements are `textarea`, and `input` with type `email`,
 `number`, `password`, `search`, `text`, `tel` and `url`. We are targeting
 the HTML elements directly rather than adding a CSS class, as we do for
 other elements that theme.json supports. This commit adds no extra styling
 unless a theme opts in to use this and the specificity of any generated
 CSS with the element is 0.

 See original Gutenberg PR:
 https://github.com/WordPress/gutenberg/pull/70378.

 Example usage:

 {{{
         "elements": {
                 "textInput": {
                         "border": {
                                 "radius": "0",
                                 "style": "solid",
                                 "width": "1px",
                                 "color": "red"
                         },
                         "color": {
                                 "text": "var(--wp--preset--color--
 theme-2)"
                         },
                         "typography": {
                                 "fontFamily": "var(--wp--preset--font-
 family--inter)"
                         }
                 }
         }
 }}}

 Reviewed by mukesh27, scruffian.
 Merges [9600] to the 6.9 branch.

 Props onemaggie, mukesh27, sabernhardt, joen, get_dave, wildworks,
 ocean90, mikachan, poena.
 Fixes #63878. See #63555.
 }}}

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


More information about the wp-trac mailing list