Skip to content

Image captions in galleries hide rounded border #43586

@justintadlock

Description

@justintadlock

Description

When an Image block within a Gallery has a border-radius, the caption background obscures the bottom corners of the Image. The <figcaption> element's bottom-border-left-radius and bottom-border-right-radius should inherit from the Image block.

Step-by-step reproduction instructions

Add a border radius to the Image block via theme.json:

{
	"styles": {
		"blocks": {
			"core/image": {
				"border": {
					"radius": "15px"
				}
			}
		}
	}
}

Test by adding a Gallery block with at least one image that has a caption.

Screenshots, screen recording, code snippet

Gallery shows an image with caption and one without:

gallery-caption-rounded

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] GalleryAffects the Gallery Block - used to display groups of images[Block] ImageAffects the Image Block[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions