Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Block: table cells in thead are misaligned when "Fixed width table cells" is toggled off #9779

Closed
designsimply opened this issue Sep 11, 2018 · 2 comments · Fixed by #10230
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended

Comments

@designsimply
Copy link
Member

Steps to reproduce:

  1. Create a new table block.
  2. Edit it to use the sample HTML below which contains thead and tbody tags.
  3. Switch back to "Edit Visually."
  4. Toggle the "Fixed width table cells" option in the sidebar.

Result: when "Fixed width table cells" is toggled off, the thead and tbody table cells are misaligned.

Sample HTML:

<table class="wp-block-table"><thead><tr><td><strong>Column One</strong></td><td><strong>Column Two</strong></td></tr></thead><tbody><tr><td>one</td><td>two</td></tr><tr><td>three</td><td>four</td></tr></tbody></table>

screen shot 2018-09-10 at 8 01 26 pm
Seen at https://madefortesting.com/wp-admin/post.php?post=512&action=edit running WordPress 4.9.8 and Gutenberg 3.7 using Firefox 62.0 on macOS 10.13.6.

h/t @mcsf for the report at #8767 (comment)

Note: even though the alignment looks off in the editor, it looks correct on the front-end using the Twenty Seventeen theme (screenshot).

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks labels Sep 11, 2018
talldan added a commit that referenced this issue Sep 17, 2018
- `table` element needs to be `display: table` so that `table-layout: fixed`
works correctly.
- `thead`, `tbody` and `tfoot` need to use their default display properties,
otherwise columns become misaligned between header, body and footer. (#9779)
- Remove unecessary width on `thead`, `tbody`, and `tfoot` which is implicitly
100%
talldan added a commit that referenced this issue Sep 18, 2018
- `table` element needs to be `display: table` so that `table-layout: fixed`
works correctly.
- `thead`, `tbody` and `tfoot` need to use their default display properties,
otherwise columns become misaligned between header, body and footer. (#9779)
- Remove unecessary width on `thead`, `tbody`, and `tfoot` which is implicitly
100%
talldan added a commit that referenced this issue Sep 19, 2018
- `table` element needs to be `display: table` so that `table-layout: fixed`
works correctly.
- `thead`, `tbody` and `tfoot` need to use their default display properties,
otherwise columns become misaligned between header, body and footer. (#9779)
- Remove unecessary width on `thead`, `tbody`, and `tfoot` which is implicitly
100%
talldan added a commit that referenced this issue Oct 3, 2018
…ord-break: break-all) (#10230)

* Remove invalid `display` properties on table, thead, tbody, and tfoot

- `table` element needs to be `display: table` so that `table-layout: fixed`
works correctly.
- `thead`, `tbody` and `tfoot` need to use their default display properties,
otherwise columns become misaligned between header, body and footer. (#9779)
- Remove unecessary width on `thead`, `tbody`, and `tfoot` which is implicitly
100%
- Use word-break: break-all to ensure content never overflows in table cells
@francescosche
Copy link

I have this issues again on WP 5.9.1 😭

@talldan
Copy link
Contributor

talldan commented Mar 14, 2022

@francescosche Would you be able to make a new issue with some details of how to reproduce the problem?

If you can include information like which theme you're using, which browser and OS, that would be great. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Projects
None yet
3 participants