-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce "Caption" as a new element #40205
Comments
Related: #41966 |
This was closed by #41140 |
@scruffian can we add a follow up to add the UI for it in global styles? |
I created the issue here |
Thanks! |
I'm a bit late to this party but thought it worth noting that while #44094 introduces UI controls for the new caption element, it does differ a little from what the RichText component for individual block captions currently offers.
This part of the issue suggests to me that we still need to address the gaps and this isn't fully closed? Things that can be configured through the element API and Global Styles (as of #44094) but not at the individual block level are:
A standalone block for captions might be worth revisiting. What do you think? |
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).The text was updated successfully, but these errors were encountered: