-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Introduce "Caption" as a new element #40205
Copy link
Copy link
Closed
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.json[Feature] Block APIAPI that allows to express the block paradigm.API 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 experiTools that impact the appearance of blocks both to expand the number of tools and improve the experi
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.json[Feature] Block APIAPI that allows to express the block paradigm.API 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 experiTools that impact the appearance of blocks both to expand the number of tools and improve the experi
Type
Fields
Give feedbackNo fields configured for issues without a type.
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).