2 months after my first input about this problem they never solved it lost faith in gutenberg team.
ok they have solved the problem with version 2.6.0
@marius84 – Thank you for telling me. I just tested it out on one of my testing websites and it is functioning the way it should.
Quite honestly, I don’t know if I’ll be using Gutenberg for a while because all my websites have static pages so they don’t change very often, but it’s nice to know that it’s there if I want to change.
not sure why this would have been solved in 2.6.0, if the theme CSS has not changed, perhaps gutenberg in 2.6.0 included code to style that class?
I think this points out one of the problems with using Gutenberg or any other page builder system. in gutenberg, when you add an image block and click on “align center”, all that gutenberg does with the image block is to add the class “aligncenter” to the image block code. it is then up to the theme code to process that class to actually center the image on the post or page. if the class “aligncenter” is not defined in the theme’s css, then the image will not be centered on the page or post when you are looking at it yourself. the image does not get centered by default or automatically.
I doubt that either Weaver or twentysixteen have a class of aligncenter defined in their CSS code, so the image will not get centered as you would expect it to. somehow, you need to ensure that the CSS required to display your content matches that generated by gutenberg.
Al
TwentySixteen does have an aligncenter, apparently, around line 1339 of style.css
.aligncenter {
clear: both;
display: block;
margin: 0 auto 1.75em;
}
I wonder is there a list of the css selectors that Gutenberg assumes?
That would be handy to add to themes in future.