[wp-trac] [WordPress Trac] #54120: Fixed table layout in Twenty Fifteen
WordPress Trac
noreply at wordpress.org
Tue Sep 14 19:27:00 UTC 2021
#54120: Fixed table layout in Twenty Fifteen
---------------------------+------------------------------
Reporter: Roenbaeck | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version:
Severity: minor | Resolution:
Keywords: 2nd-opinion | Focuses: css
---------------------------+------------------------------
Changes (by sabernhardt):
* keywords: => 2nd-opinion
* version: 5.8.1 =>
* component: Themes => Bundled Theme
Old description:
> 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.
New description:
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.
--
Comment:
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;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54120#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list