Table Block: alignment options are inconsistent and do not show up on the front end
Steps to reproduce:
- Create a new post and add a table block with some text in each cell.
- Click the "Align center" option in the toolbar to center all of the text.
- Publish the post and view it on the front end.
- Edit the post and choose the "Align right" option.
- Update the post and view it on the front end.
Result: centering makes the table appear full width and all text centered in the editor but neither is centered when the table is viewed on the front-end. Right aligning the table make the table move to the right but the text is not affected and neither the table nor the text is right-aligned on the front end.
h/t Radu Constantin for the report at https://make.wordpress.org/test/2018/09/05/call-for-testing-gutenberg-3-8-pre-release/#comment-1042




Seen at https://madefortesting.com/wp-admin/post.php?post=507&action=edit and https://madefortesting.com/2018/09/11/table/ running WordPress 4.9.8 and Gutenberg 3.8.0-rc.1 with the Twenty Seventeen theme active and using Firefox 62.0 on macOS 10.13.6.
The "Align center" option adds a data-align="center" attribute to editor-block-list__block, which adds the rule
.editor-block-list__block[data-align="center"] {
text-align: center;
}
Removing this rule will stop text from being centered in the table (which I think is the desired functionality because the rest of the alignment options don't align the text inside the table, not even on the front end). But this might break the alignment for other core blocks in the editor.
@talldan do we have more actionable pieces here?
@mtias - thanks for the ping. I'll pick this one up asap.