Describe the bug
Inside the editor, when a single column is added and its width is set to a custom value (e.g. 50%), the column is centered inside its parent (columns) container. While on the front, the column is left-aligned inside its parent container. (Note that it also happens with multiple columns when their total width isn鈥檛 100%).
To reproduce
Paste the following code inside the editor:
<!-- wp:columns {"align":"wide","style":{"color":{"background":"#e5e3e3"}}} -->
<div class="wp-block-columns alignwide has-background" style="background-color:#e5e3e3"><!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:paragraph -->
<p>Single column set to 50%.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Lorem ipsum dolor sit amet, commodo erat adipiscing elit. Sed do eiusmod ut tempor incididunt ut labore et dolore.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
| Inside the editor | On the front-end |
| ------------- | ------------- |
| |
|
Expected behavior
Inside the editor, the single column should be left-aligned.
Editor version:
WordPress 5.6 beta 2. Tested with the three latest default WordPress themes, including Twenty Twenty One.
I can reproduce this in WP 5.5.3, so it's not a 5.6-specific regression. Editing the title to clarify.
Seems like the normal/correct behavior is the one on frontend.
If there's no alignment set, the columns should have default alignment.
Most helpful comment
Seems like the normal/correct behavior is the one on frontend.
If there's no alignment set, the columns should have default alignment.