Skip to content
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

Gallery: add background color block supports #43294

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Aug 17, 2022

Related:

What?

Enabling background color and gradients for the gallery block.

The background color is displayed by default.

Text is deliberately omitted because it has no effect on captions, and there is otherwise no text in a gallery.

Why?

To add the option to provide a background color to gallery blocks.
To create consistency across blocks.

How?

Adding the relevant block supports in block.json

Testing Instructions

  1. Load the block editor with gallery block.
  2. Add some images. You might have to increase the blockGap value to see the background better.
  3. Confirm the colors control panel is there and has a background control.
  4. Add a background color or gradient
  5. Save and confirm the styles appear on the frontend
  6. Test the new support works for the block via theme.json and global styles. See example JSON below.
	"styles": {
		"blocks": {
			"core/gallery": {
				"color": {
					"background": "blue"
				}
			}
		}
	},

Screenshots or screencast

2022-08-17.13.11.30.mp4

@ramonjd ramonjd added [Type] Enhancement A suggestion for improvement. [Block] Gallery Affects the Gallery Block - used to display groups of images [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Aug 17, 2022
@ramonjd ramonjd self-assigned this Aug 17, 2022
Copy link
Contributor

@carolinan carolinan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well ( -would work better if the block had padding controls :) )

@ramonjd ramonjd merged commit 2284037 into trunk Aug 17, 2022
@ramonjd ramonjd deleted the add/gallery-background-color-block-supports branch August 17, 2022 23:58
@github-actions github-actions bot added this to the Gutenberg 14.0 milestone Aug 17, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs User Documentation Needs new user documentation [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants