You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Global Styles - expose way to add more 'Elements' to the UI #64362
Right now there is seemingly no way to introduce more elements to the Global Styles 'Elements' section. There seems to be a pre-defined list of items such as text, background, button, link, etc. As a developer, we may want to introduce other elements that live across the site and can be styled based on a color palette. For example, right now there is only 'Button' in the elements. Consider a site which has a primary button and secondary button. If we expose the Elements section to plugins / themes, those can add a 'Secondary button' element. This secondary button element can get a color based on the palette and then it can be styled properly throughout a website.
Here's a general list of elements and pseudo-elements that I have to style via custom CSS instead of theme.json for most block themes because we're missing support:
input[*type]
textarea
::placeholder
label
img (note that the Image block doesn't cover all <img> tags)
abbr
code (for inline code)
del
s
ins
kbd
mark
sup
sub
ul / ol / li (and nested lists and list items)
::marker
::selection
Reacted by Ralf Wiechers, Hannes Leismann, Syed Abrar Ahmed Shah, Mikael Korpela and Huub
Activity
justintadlock commentedon Sep 14, 2024
Here's a general list of elements and pseudo-elements that I have to style via custom CSS instead of
theme.jsonfor most block themes because we're missing support:input[*type]textarea::placeholderlabelimg(note that the Image block doesn't cover all<img>tags)abbrcode(for inline code)delsinskbdmarksupsubul/ol/li(and nested lists and list items)::marker::selectionsimison commentedon Aug 28, 2025
Added a separate issue for adding
::placeholdersupport:::placeholderCSS pseudo-element in theme.json #71382Here's a separate issue for form elements, where some work is already happening: