[wp-trac] [WordPress Trac] #63555: Backport Global Styles: add support for select or dropdown elements
WordPress Trac
noreply at wordpress.org
Wed Jun 11 08:20:41 UTC 2025
#63555: Backport Global Styles: add support for select or dropdown elements
-------------------------+------------------------------
Reporter: onemaggie | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------------------
Changes (by onemaggie):
* component: General => Editor
Old description:
New description:
This PR adds a new class that can be used by themers and extenders to
style selects or dropdown elements. Right now the experimental form block
doesn't have dropdowns in it, but many extenders do, so I wanted to cover
them too in line with the work being done at
https://github.com/WordPress/gutenberg/pull/70378/
We are adding a new class wp-element-select the same way we do for the
button element, since it's less disruptive than styling the select element
directly and can be slowly adopted by plugins as they see fit
This one is a little hard to test without having a native block that has a
dropdown in it. What I did was:
1. alter a third party block to have the wp-element-select class.
2. added the following to my theme.json file:
{{{
"elements": {
"select": {
"color": {
"text": "red",
"background": "blue"
}
},
}
}}}
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63555#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list