WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 6 weeks ago

#54120 new defect (bug)

Fixed table layout in Twenty Fifteen

Reported by: 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 (1)

#1 @sabernhardt
6 weeks 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;
}
Note: See TracTickets for help on using tickets.