Skip to content

Gallery Block: Allow Caption Background Customizations #94075

Open

Description

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

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

Metadata

Assignees

No one assigned

    Labels

    Customer ReportIssues or PRs that were reported via Happiness. Previously known as "Happiness Request".Issues or PRs that were reported via Happiness. Previously known as "Happiness Request".[Feature Group] Editor ExperienceFeatures related to Gutenberg integration on WordPress.com.Features related to Gutenberg integration on WordPress.com.[Feature] Core BlocksBlocks that come with Gutenberg.Blocks that come with Gutenberg.[Product] WordPress.comAll features accessible on and related to WordPress.com.All features accessible on and related to WordPress.com.[Type] Feature RequestFeature requestsFeature requests

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions