Demo content cover block alignment not respected. Migration needed? #28476
Labels
[Block] Cover
Affects the Cover Block - used to display content laid over a background image
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Carried over from #28404 (comment) and #28404 (comment):
I'm seeing one editor/frontend inconsistency with the demo content when using a theme that supports wide and full alignment (such as Twenty Twenty One). If I select the very first cover block and set its alignment to center, that setting is not respected on the frontend:
Editor:
Frontend:
The block has the
alignwide
className
set when first loading it:Then, when I set the alignment to
center
:So now we have
"align":"center"
, but the wide alignment is also kept inclassName
.The immediate fix is probably as easy as removing the
alignwide
className
attribute, and replacing it with an"align":"wide"
one:gutenberg/post-content.php
Line 9 in 6f914fe
However, this might hint at an underlying problem: Shouldn't block migrations take care of that for us (upon loading in the editor)? 🤔
The text was updated successfully, but these errors were encountered: