Cover Block: Fix default background dim#36312
Conversation
|
Size Change: +8 B (0%) Total Size: 1.08 MB
ℹ️ View Unchanged
|
fullofcaffeine
left a comment
There was a problem hiding this comment.
Just to clarify - the issue only happens with the default black dim that's added just after you add the Cover block, which was lost before this fix. That being said, this tests well!
|
Hi @noisysocks, It seems that this PR wasn't backported in WP 5.9 RC2. |
|
@dianeco Thanks for reporting this. I wasn't able to replicate it: Are you able to share the block markup of both versions, ie. copy and paste ` chunk from editor code view from 5.8.3 and then after reloading the editor in 5.9? It might be a combination of the attributes you have set for the cover that is causing this to happen in your instance. @noisysocks I have checked and it looks like this patch is included in 5.9 as the default dimRatio of 50 is applied when adding a new cover with media. |
|
@glendaviesnz I discovered an issue and maybe wrongly assumed that this PR was fixing it. My issue is that the overlay opacity on covers previously created with WP 5.8 isn't applied in WP 5.9 RC 2 (and Gutenberg). To reproduce:
Let me know if I should open a new issue. |
|
WP 5.9 includes all versions ≤ Gutenberg 11.9, so this PR will have automatically been included. @dianeco: Yes, please create an issue 😀 |

Description
After #35065, the default background dim for the Cover block disappeared. This PR fixes it.
What caused the bug?
In #35065 we changed the Cover block's markup which caused the
has-background-dimclass to not take effect anymore as it's no longer paired with the top-levelwp-block-coverclass. This PR fixes thehas-background-dimclass dependency.Default Cover block's markup before #35065:
Default Cover block's markup after #35065:
Fixes #36310
How has this been tested?
trunknpx wp-env start && npm run dev)Screenshots
Types of changes
Bug fix
Checklist:
*.native.jsfiles for terms that need renaming or removal).