From Aadil:
When I resized the image, it defaulted to a ‘left alignment’ but everything else on the page is aligned in the center. ‘Align Center’ should be the default arrangement
Here's an example:
I'm actually becoming kind of opinionated about the alignment that we are enforcing in the template parts.
For most vanilla blocks, Gutenberg lets the user choose the alignment. We, instead, are basically overriding the user choice with a predefined alignment (e.g. center in the header, left in the footer).
Imho this is bad for two reasons:
I'd say we have two options here:
wp_template
.One thing we have to remember here is that the Modern Business header and footer styles were not built with Gutenberg in mind, so the styling is very strong and opinionated. When we convert the Varia base theme, we will need to make sure styles are easily to override by Gutenberg set options.
or have a predefined alignment (e.g. the FSE blocks, Site Title, Description, and Navigation).
This is the best option IMO, if we can set a preferred alignment via the editor, and make sure that the styles coming from the theme are not so strong that it overrides anything set by Gutenberg.
@Copons I think fixing this will also fix
https://github.com/Automattic/wp-calypso/issues/35569
https://github.com/Automattic/wp-calypso/issues/35532
https://github.com/Automattic/wp-calypso/issues/35541
So just to be 100% clear, we should:
text-align
from header and footer.text-align
to the FSE blocks (Title, Description, Navigation), center
in the header, and left
in the footer.Yes, I think that's right, so we'd be giving the power to Gutenberg with a reasonable default. Does that make sense to you?
On hold!
Let's check again after Automattic/template-first-themes-private#126
In FSE: add the explicit text-align to the FSE blocks (Title, Description, Navigation), center in the header, and left in the footer.
Like page templates, on the demo site, we should select the right alignment (in this case of the header, all blocks should have centred alignment selected. So when a user receives the header, the alignments for those blocks have already been selected.
We are probably saying the same thing, but just in case.
In FSE: add the explicit text-align to the FSE blocks (Title, Description, Navigation), center in the header, and left in the footer.
Like page templates, on the demo site, we should select the right alignment (in this case of the header, all blocks should have centred alignment selected. So when a user receives the header, the alignments for those blocks have already been selected.
We are probably saying the same thing, but just in case.
@iamtakashi FSE blocks (Site Title, Description, Navigation) don't have an alignment option that the user can select in Gutenberg. In those cases, we will provide a pre-determined alignment via CSS based on the demo site.
Other Gutenberg blocks that have an alignment option (e.g. Paragraph, Heading, etc.) will be aligned according to whatever the user selected in Gutenberg, and so we won't force any alignment in CSS.