Open strarsis opened 2 years ago
I do run into this. Part of the problem is that the cover block is the only option we have for layering blocks over other blocks, and sometimes the block options are not suitable for what we are trying to create.
I haven't tested it, but it sounds like from https://github.com/WordPress/gutenberg/issues/46148 you may be able to disable the color for the cover block using theme.json ?
https://github.com/WordPress/gutenberg/pull/50115 suggests to me that it's possible to disable colors for the block - does this sufficiently resolve this issue for you @strarsis (and @carolinan for a gut check)?
https://github.com/WordPress/gutenberg/pull/50115 suggests to me that it's possible to disable colors for the block - does this sufficiently resolve this issue for you @strarsis (and @carolinan for a gut check)?
Disable color for all blocks of this block type or only for specific blocks? One may still want to use a solid background color in some blocks.
Disable color for all blocks of this block type or only for specific blocks? One may still want to use a solid background color in some blocks.
Ah yes - so the theme.json approach wouldn't work for that then.
I think it is also possible to disable only the color control of the cover block:
However, when inserting a cover block, the color palette simply disappears and you are forced to insert an image.
Personally, I think that the cover block, as the name suggests, is intended to have some kind of background. If you don't need a background, can you use a group block instead? I think the group block covers many of the things that can be done with the cover block.
What problem does this address?
Sometimes a
core/cover
block is heavily styled by a theme, e.g. by adding complex decorative elements and background effects to it.The
cover/block
currently forces a color or image selection at insertion. The theme then has to forcefully hide any color or image before applying its own complex styles. Alternatively the theme needs to rely on the end user cooperation that0
opacity
is applied.What is your proposed solution?
Make the color/image selection optional and not mandatory as it is the case right now.