Make WordPress Core

Opened 3 years ago

Last modified 8 days ago

#54120 new defect (bug)

Twenty Fifteen: Fixed table layout

Reported by: roenbaeck's profile Roenbaeck Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version:
Component: Bundled Theme Keywords: 2nd-opinion dev-feedback
Focuses: css Cc:

Description (last modified by sabernhardt)

The CSS for Twenty Fifteen contains a line forcing fixed layout for tables:

   table {
      border-collapse: separate;
      border-spacing: 0;
      border-width: 1px 0 0 1px;
      margin: 0 0 1.6em;
      table-layout: fixed; /* Prevents HTML tables from becoming too wide */
      width: 100%;

This causes unexpected behavior since you in Gutenberg have the option to select between a fixed or dynamic layout for table blocks, but this has no effect.

Change History (5)

#1 @sabernhardt
3 years ago

  • Component changed from Themes to Bundled Theme
  • Description modified (diff)
  • Keywords 2nd-opinion added
  • Version 5.8.1 deleted

Thanks for the report!

Twenty Sixteen also has fixed layout for the table element, as well as on the .wp-block-table class (which is now assigned to the table's container instead).

The table element styles probably should stay the same to avoid changing the layout of existing tables, especially if they were created with another editor. Would something like this be fair?

.wp-block-table table:not(.has-fixed-layout) {
    table-layout: auto;

#2 @desrosj
23 months ago

  • Summary changed from Fixed table layout in Twenty Fifteen to Twenty Fifteen: Fixed table layout

#3 @karmatosed
6 weeks ago

  • Keywords dev-feedback added

This ticket was mentioned in Slack in #core-themes by karmatosed. View the logs.

2 weeks ago

#5 @karmatosed
8 days ago

  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.