Closed
Description
openedon Apr 9, 2022
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