Skip to content

Cover Block: allow the overlay color and height default values to be changed by theme.json #27809

@MaggieCabrera

Description

@MaggieCabrera

The theme should be able to define the background color by default from the theme.json file. This is needed specifically when the background of the cover block is an image (and therefore the user can change its opacity revealing said background color). Right now the editor is defaulting to black and can only be overridden by the theme's css

I don't see the Cover block on this table on the docs: https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/developers/themes/theme-json.md#color-properties

EDIT:

I'm also adding the height of the cover block to this issue for the same reasons. If the end-user can change the values of the height and overlay colors for the cover block, I don't see why we can't have the theme.json be able to set the default values for them too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Block] CoverAffects the Cover Block - used to display content laid over a background image[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions