Repository navigation
Form elements in Global Styles - iteration for WP 7.2 #34198
Copy link
Copy link
Open
6 / 116 of 11 issues completedOpen
6 / 116 of 11 issues completed
Copy link
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] EnhancementA suggestion for improvement.A suggestion for improvement.[Type] IterationScoped iteration of an effort from a tracking issue or overview issue ideally for a major release.Scoped iteration of an effort from a tracking issue or overview issue ideally for a major release.
Description
Overall goal
Let users style common form elements consistently from Global Styles, without writing custom CSS or editing theme.json by hand.
The button, textInput, and select elements are already supported in theme.json. This iteration exposes that work in the editor, adds the missing label element, and improves support for interactive input states.
Prior art: #34198.
Scope for this release
- Register the label element in theme.json #81647 (Global styles: Register <label> as element #81160)
- Expose form elements in Global Styles typography and color settings #81648 (Global Styles: Expose additional elements in Typography and Colors #80852)
- Support
::placeholderCSS pseudo-element in theme.json #71382 (Global Styles: Add pseudo-selector support for text inputs #71634) - WP 7.0 does not support pseudo-selectors for the textInput, select, core/query-pagination-next, core/query-pagination-previous #76534 (Global Styles: Add pseudo-selector support for text inputs #71634, Global Styles: Add pseudo-selector support for select elements #81644)
- Add a Form controls section to Global Styles #81649 (Global Styles: List elements alongside blocks #81645)
- Preview the selected state on element screens (Global Styles: Preview the selected state on element screens #83787)
Nice to have
- Expose Labels in Global Styles #81650
- Search block doesn't respect background and text color options #65343
- Outline styling of search button in the Search Block during a focus state is not applied #52615 (Search: Don't clip the button focus outline when the field is collapsed #84685)
- File Block: use inner block for Button #57314
- Search Block: Global border style settings mismatch with block style #68195 (fixed by Search block : Match behaviour of global styling for border and color with local styling (inspector controls) to remove inconsistency #77060)
- Password protected form: Add
wp-element-buttonclass to the submit input #61353 (fixed in Core in r62754)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] EnhancementA suggestion for improvement.A suggestion for improvement.[Type] IterationScoped iteration of an effort from a tracking issue or overview issue ideally for a major release.Scoped iteration of an effort from a tracking issue or overview issue ideally for a major release.
Type
Projects
- StatusShow more project fields📋 Iteration/Tracking Issues
Activity
oandregal commentedon Aug 20, 2021
For context, a related conversation is #34141 (comment)
oandregal commentedon Aug 20, 2021
MaggieCabrera commentedon Aug 20, 2021
oandregal commentedon Aug 23, 2021
overclokk commentedon Oct 16, 2021
carolinan commentedon Aug 8, 2022
I believe that this has been solved for buttons?
How can we move this forward and discuss the other form elements?
MaggieCabrera commentedon Aug 23, 2022
I think no one has picked anything up, but I don't think there's any blockers besides wanting to work on it? Working on the input or labels would be great, it would give themers and users much better control over the search block as a whole. Also, when we upgrade the comments form to a proper block it would be great to have them all be made with elements from the start.
mtias commentedon Sep 10, 2022
All form element need a lot more thinking before being considered for the elements API, including how they are going to be controlled, and how they are going to be leveraged by block authors.
senadir commentedon Sep 10, 2022
I'd love to see any docs around this?
MaggieCabrera commentedon Sep 12, 2022
Elements are documented here
dkjensen commentedon Feb 2, 2023
+1
mikeritter commentedon Feb 9, 2023
This is holding me back.
I don't see a roadmap to keep this on track.
HTML Form elements
Inputs?
The select element
Fieldset
Optgroup
13 remaining items
wp-element-buttonclass to the submit input #61353carolinan commentedon Aug 18, 2026
@t-hamano Hi, wasn't the password protected form fixed in core in 7.1? Then we should close 61353.
t-hamano commentedon Aug 18, 2026
Yes, that should have been fixed by Changeset 62754.
annezazu commentedon Oct 12, 2026
@MaggieCabrera can you please provide an update on where this work stands, especially as we get close to beta 1 on the 20th? It’s helpful to get a latest look at these changes and have more updates along the way.
MaggieCabrera commentedon Oct 14, 2026
7.2 update
Labels are now a
theme.jsonelement (#81160, thanks @sarthaknagoshe2002), and form elements show up in Typography and Colors (#80852).Everything below is aiming for Beta 1 on October 20. If you can help review, please start with these two:
Good to have:
Search block colors (#65343) and the File block button (#57314) move to 7.3, since their PRs haven't changed in a while.