Skip to content

Global Styles - expose way to add more 'Elements' to the UI #64362

Open

Description

@Zealth57

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.

Activity

  1. added
    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json
    [Feature] ExtensibilityThe ability to extend blocks or the editing experience
    on Sep 14, 2024
  2. justintadlock commented on Sep 14, 2024

    @justintadlock
    Contributor

    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
  3. simison commented on Aug 28, 2025

    @simison
    Member

    Added a separate issue for adding ::placeholder support:

    Here's a separate issue for form elements, where some work is already happening:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ExtensibilityThe ability to extend blocks or the editing experience[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions