Skip to content

Cover block overlay color empty if disabled by theme.json #46148

@MatzeKitt

Description

@MatzeKitt

Description

For my theme, the color settings are removed completely:

{
	"version": 2,
	"settings": {
		"color": {
			"custom": false,
			"customDuotone": false,
			"customGradient": false,
			"duotone": [],
			"gradients": [],
			"link": false,
			"palette": [],
			"text": false,
			"background": false,
			"defaultGradients": false,
			"defaultPalette": false
		}
         }
}

Nevertheless, the cover block displays the color setting for the overlay color. But clicking on it returns an empty popover, since there is no color. So if there is no color, the color setting for the cover overlay should be omitted completely.

Step-by-step reproduction instructions

  1. Use the theme.json above.
  2. Create a new post and add a cover block.
  3. Add an image to the cover block.
  4. See color settings of the cover overlay.

Screenshots, screen recording, code snippet

Bildschirm­foto 2022-11-29 um 11 41 04

Environment info

  • WordPress 6.1, no Gutenberg plugin installed

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] CoverAffects the Cover Block - used to display content laid over a background image[Block] NavigationAffects the Navigation Block[Block] Post Featured ImageAffects the Post Featured Image Block[Block] SocialAffects the Social Block - used to display Social Media accounts[Feature] ColorsColor management

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions