Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Gallery Block: Allow Caption Background Customizations #94075

Open mxhassani opened 2 weeks ago

mxhassani commented 2 weeks ago

What

Allow the option to customize how captions are displayed on the Gallery Block

Why

Currently, it is only possible to change the text, and highlight it as a way to customize it, but there isn't a direct way to change the background of the caption element. Some themes add styles like blurry or colored backgrounds and users don't have a way to change that, other than custom CSS.

image

How

Controls can be added to the toolbar image

But adding them to the sidebar settings of the Gallery block and/or the image blocks can be a fitting solution too.

Options could be: background styles and caption alignment (over image/below it - left right ...)

As a workaround, there is this CSS code (Works with theme Tenku):

/* Remove blur effect from captions */
.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before {
  display: none;
}

8629501-zen

github-actions[bot] commented 2 weeks ago

Support References

This comment is automatically generated. Please do not edit it.

Robertght commented 1 week ago

Another request in 8669191-zen

Robertght commented 1 week ago

8673244-zen

Robertght commented 1 week ago

8673583-zen

hacchism commented 1 week ago

8670196-zen

khristiansnyder commented 1 week ago

8674925-zen