Make WordPress Core

Opened 21 months ago

Last modified 2 weeks ago

#58297 new defect (bug)

Twenty Seventeen: Table block does not have same design in editor and front.

Reported by: nidhidhandhukiya's profile nidhidhandhukiya Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3
Component: Bundled Theme Keywords: has-patch
Focuses: css Cc:

Description

Steps to reproduce the issue :-

  1. Activate Twenty Seventeen Theme.
  2. Choose Table block.
  3. Add some text.
  4. Check that table in editor side and user side both.

In editor side we have the border and when you check front side that border is missing.

I have attached video for better understanding.
Video URL :- https://share.cleanshot.com/JCmf3Y5bv6TZ1FXzMc5m

Attachments (1)

58297.2.patch (413 bytes) - added by nidhidhandhukiya 21 months ago.

Download all attachments as: .zip

Change History (7)

#1 @sabernhardt
21 months ago

  • Focuses css added
  • Summary changed from Twenty Seventeen - Table block does not have same design in editor and front. to Twenty Seventeen: Table block does not have same design in editor and front.
  • Version changed from 6.2 to 5.3

The border is not missing on the front end; it is a very light gray and only on the bottom for each cell. This is part of the theme's design.

The discrepancy comes from moving the .wp-block-table class to the figure element in WordPress 5.3, yet this theme still applies the block styles to a nonexistent table element with that class. Any change should be made to the editor stylesheet. On the other hand, having darker borders in the editor can make editing the table's content easier.

#2 @karmatosed
10 months ago

  • Keywords needs-refresh added

#3 @karmatosed
9 months ago

  • Keywords has-patch added

This ticket was mentioned in PR #8090 on WordPress/wordpress-develop by @sainathpoojary.


2 weeks ago
#4

  • Keywords needs-refresh removed

This PR updates the CSS selectors for the table block in the Twenty Seventeen theme to ensure consistent styling between the editor and frontend. The .wp-block-table class was moved to the <figure> element in WordPress 5.3, but the theme still applied styles to a non-existent table element.

Before:

https://github.com/user-attachments/assets/174a65be-c566-4f03-b8f8-1530fa2e3fe7

After:

https://github.com/user-attachments/assets/4322492b-61f1-4b7f-8b6b-ae17b413c1f7

Trac ticket: #58297

#5 @sainathpoojary
2 weeks ago

Hey @sabernhardt,

I’ve updated the selectors to target figure.wp-block-table table, as mentioned. This resolves the styling discrepancy and ensures consistency between the editor and frontend.

Let me know if anything else is needed!

#6 @abcd95
2 weeks ago

Test Report

This report validates that the indicated patch PR 8090 works as expected.

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.25
  • Server: nginx/1.27.2
  • Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.25)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Seventeen 3.8
  • MU Plugins: None activated

Actual Results

✅ Issue resolved with the patch.

Additional Notes

Although I didn't see any line separating the columns of the new table block, there must be distinctions between the rows and columns since it is a table. I suggest separating lines between the columns for better understandability and accessibility.

Supplemental Artifacts

Editor -

https://i.postimg.cc/DwnWWNcS/image.png

Frontend -

https://i.postimg.cc/GtjC6XTf/image.png

Note: See TracTickets for help on using tickets.