-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
What problem does this address?
A good follow-up to adding form element support to theme.json would be adding ::placeholder CSS pseudo-element support and ability for blocks to opt into frontend UX to manipulate placeholder colour.
It's typical for different 3rd party form plugins to have placeholders in their form inputs:
Theme.json support would allow themers and site builders to define styles (colour, typography) for the text without using CSS.
Adding UX would allow 3rd party plugins to simply opt in and have control at least for colour alongside other input style controls:
Other style options might be useful, but colour seems most important, as otherwise text can often follow regular input value text styles.
UX for something like ::placeholder is more straightforward than adding UX for states like :hover, :visited, etc., which would have much more complex UX needs to allow previewing different states. See design exploration. Meawnwhile, adding :hover support just in theme.json should be simpler without considering UX.
What is your proposed solution?
- Add
theme.jsonsupport for::placeholderelement. - Add ability to opt into colour UX for placeholder with:
supports: { color: { placeholder: true, }, }