Make WordPress Core

Opened 21 months ago

Last modified 11 months ago

#54120 new defect (bug)

Twenty Fifteen: Fixed table layout

Reported by: roenbaeck's profile Roenbaeck Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Bundled Theme Keywords: 2nd-opinion
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 (2)

#1 @sabernhardt
21 months 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
11 months ago

  • Summary changed from Fixed table layout in Twenty Fifteen to Twenty Fifteen: Fixed table layout
Note: See TracTickets for help on using tickets.