Regression: Cover Block style changes in 5.9 break opacity for older cover blocks #38466
Labels
[Block] Cover
Affects the Cover Block - used to display content laid over a background image
[Type] Bug
An existing feature does not function as intended
[Type] Regression
Related to a regression in the latest release
Description
I have a site using the standard cover block with no customizations. When updating to WordPress 5.9, the block's opacity setting does not work until resaving the page which forces the cover block's markup and classes to change.
Prior to WordPress 5.9, the
has-background-dim-XX
class was on the cover block container. That class was moved to aspan
that's a direct descendant of the parent div. These markup changes won't be applied to legacy content until a post is resaved, but it appears the styles that make old cover block opacity work were removed.Solution: The
has-background-dim-XX
classes that work when applied to the Cover block's parent container should be left in core indefinitely for the purposes of backward compatibility.Step-by-step reproduction instructions
has-background-dim-XX
classes are applied)Screenshots, screen recording, code snippet
WordPress 5.8.3 (90% opacity, classes:
wp-block-cover alignfull has-background-dim-90 has-palette-2-background-color has-background-dim has-parallax is-style-no-padding
):WordPress 5.9:
Environment info
theme.json
child theme of MichellePlease confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: