The template to follow the same rules as if someone were manually creating it.
The template is created in a way that doesn't seem to be possible to recreate manually using blocks, and it functions differently as a result.
All.
The top is a manual recreation and the bottom is the Balasana Template:
Here is how the buttons look when manually created in the Code Editor:
And here's how they look when using the Balasana template in the Code Editor:
And the differences behave differently. The template version is not able to be manually recreated, but it's used in our template, and has interesting behaviors across different themes.
Assuming "Appetite" and "Balsana" are either pattern, page template or theme names? 馃檭
Assuming "Appetite" and "Balsana" are either pattern, page template or theme names? 馃檭
Appetite is a theme: https://wordpress.com/theme/appetite
Balasana is both a theme: https://wordpress.com/theme/balasana
And a template (layout?):
I see. The difference seems to be that you have buttons
(container of many buttons) and a button
(a single button) blocks. Latter doesn't center-align.
@kjellr :wave: Have there been issues with button alignments in themes, specifically in _Appetite_ theme?
It's very possible that there's an issue in Appetite. This should be filed over in the Premium Themes Trac.
It's very possible that there's an issue in Appetite. This should be filed over in the Premium Themes Trac.
Is there a reason the Balasana template is using something different from a Button Block as it's added? If it used the actual button block (container?), it should work across all themes.
The issue is that the template can be used regardless of the active theme, since users are prompted to add a template (layout?) to a page whenever a new page is created. Themes seem to know how to handle the Button Block, but however it's added to Balasana (an individual button - not a block?), other themes don't seem to be prepared to know how to handle that.
Is there a reason the Balasana template is using something different from a Button Block as it's added? If it used the actual button block (container?), it should work across all themes.
@ianstewart question for ya :-)
The Balasana defaults appear to work as expected in other Varia-themes. Coutoire, for example.
And can appear broken in non-Varia-themes. Twenty Twenty, for example.
So the issues with the display may extend beyond that one theme to all or many non-Varia themes.
(Looking at the issue with re-creating the layout in the WP.com Editor with @iamtakashi.)
I also can't get re-build the Balasana Layout from scratch in Balasana because I can't add a single Button Block on it's own and the Single Buttons, center-aligned in columns, aren't center-aligning.
Another example, with the Editor View (which also doesn't display center-alignment) in Balasana and different text that better shows off the misalignment.
The difference seems to be that you have buttons (container of many buttons) and a button (a single button) blocks. Latter doesn't center-align.
however it's added to Balasana (an individual button - not a block?)
I think there's a few issues here.
We can update the layout (to resolve the issue with item 3) but I think we'll still need to fix the theme issues.
How did we get a single button outside the buttons block in the Balasana homepage layout?
It might've been possible in older editor versions but has since been deprecated.
Hmm, if this is happening in _all_ themes (and I think it is, based on my testing), I think this is probably a regression that should be fixed on Gutenberg's side. I'll do a little digging in later today.
Yeah, this does indeed seem like a regression in Gutenberg. Gutenberg provides front-end styles to ensure that buttons are center aligned in the _Buttons_ block, but it does not do so for the old _Button_ block. I've filed an issue here: https://github.com/WordPress/gutenberg/issues/23291
Looks like this is fixed in https://github.com/WordPress/gutenberg/pull/23381.
Most helpful comment
Hmm, if this is happening in _all_ themes (and I think it is, based on my testing), I think this is probably a regression that should be fixed on Gutenberg's side. I'll do a little digging in later today.