Make WordPress Core

#56462 closed defect (bug) (fixed)

Twenty Eleven: Table thead color not reflected in editor and front side

Reported by: umesh84's profile umesh84 Owned by: audrasjb's profile audrasjb
Milestone: 6.1 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch has-screenshots commit
Focuses: ui, css Cc:

Description (last modified by mukesh27)

Table thead color not reflected in editor and front side

1: Activate the Twenty Eleven Theme
2: Add table
3: Select text color in table

Attaching a video link for better understanding.
https://www.loom.com/share/d7d5eced7f864ef598bc37bd09ada34f

Attachments (5)

#56462.patch (774 bytes) - added by umesh84 20 months ago.
added patch
56462.1.patch (830 bytes) - added by multidots1896 20 months ago.
Applied patch
56462.2.patch (2.5 KB) - added by sabernhardt 20 months ago.
tables-front-end-comparisons.png (461.4 KB) - added by sabernhardt 20 months ago.
Front-end screenshots to compare before and after patch
tables-editor-comparisons.png (294.8 KB) - added by sabernhardt 20 months ago.
Editor screenshots to compare before and after patch

Download all attachments as: .zip

Change History (11)

@umesh84
20 months ago

added patch

#1 @mukesh27
20 months ago

  • Description modified (diff)
  • Keywords has-patch added; needs-patch removed
  • Version 6.0.1 deleted

#2 @mukesh27
20 months ago

  • Summary changed from Theme Twenty Eleven: Table thead color not reflected in editor and front side to Twenty Eleven: Table thead color not reflected in editor and front side

#3 @mukesh27
20 months ago

  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to 6.1

Hi there!

Thanks for the ticket and patch. It does not work for the editor. Is it working for you? In my case I have to update the selector class.

.editor-styles-wrapper .wp-block-table th,
.editor-styles-wrapper .wp-block-table td {
	padding: 0;
	color: currentColor;
}

@multidots1896
20 months ago

Applied patch

@sabernhardt
20 months ago

Front-end screenshots to compare before and after patch

@sabernhardt
20 months ago

Editor screenshots to compare before and after patch

#4 @sabernhardt
20 months ago

  • Keywords has-screenshots added; reporter-feedback removed

Some people may prefer the gray text for header cells when they select a text color for the data cells, though matching header and body cell colors may be the better choice (especially if the table has a background color). When users do not select their own text color, the header cells should remain gray.

In the editor, the .editor-block-list__block class became .block-editor-block-list__block several releases ago. I like the proposal to use .editor-styles-wrapper instead. The cell padding should not have been zero anyway, so I fixed the values in the editor and mirrored them for RTL on the front end as well.

Taking it further beyond the original scope, 56462.2.patch includes editor styles for the caption and the border below it. The wp-block- class is no longer first in the classes list.

(If you're wondering about some English text strings in the Hebrew screenshots, the Gutenberg plugin is not fully translated.)

#5 @audrasjb
19 months ago

  • Keywords commit added
  • Owner set to audrasjb
  • Status changed from new to accepted

Ok thanks for the patch and testing @sabernhardt.
Let's go with 56462.2.patch then.

#6 @audrasjb
19 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 54340:

Twenty Eleven: Improve text color consistency of Table Block heading cells and figcaption.

This changeset ensures the text color selected for the text of the Table Block is reflected on the thead cells, on the figcaption and on the border below it. It also adds better consistency in headings cells padding.

Props umesh84, mukesh27, multidots1896, sabernhardt.
Fixes #56462.

Note: See TracTickets for help on using tickets.