-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Support ::placeholder CSS pseudo-element in theme.json #71382
Copy link
Copy link
Open
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.jsonNeeds Design FeedbackNeeds general design feedback.Needs general design feedback.[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
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.jsonNeeds Design FeedbackNeeds general design feedback.Needs general design feedback.[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.
What problem does this address?
A good follow-up to adding form element support to theme.json would be adding
::placeholderCSS 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
::placeholderis 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:hoversupport just in theme.json should be simpler without considering UX.What is your proposed solution?
theme.jsonsupport for::placeholderelement.