Skip to content

Introduce "Caption" as a new element #40205

Closed

Description

Hinted at in #34574.

It's time to move towards introducing some new elements to the Elements API. Captions are used across blocks (images, embeds, videos, etc) and a prime example of what we have called elements in the global styles' sense. Right now core registers some default styles for captions through wp-block-styles, which we should transition to this system.

Captions would become a new element alongside Links in the interface, and can be defined globally or per block type.

At the block level, we should probably introduce a new component to encapsulate the definition, class, CSS variables, etc. Blocks can use this component like they use RichText (it'd be a wrapper around RichText anyways).

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

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] Block APIAPI that allows to express the block paradigm.[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions