Make WordPress Core

Opened 13 months ago

Last modified 2 months ago

#58362 new defect (bug)

Twenty Ten: Table block having issue with font size on editor side

Reported by: iamfarhan09's profile iamfarhan09 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 6.2
Component: Bundled Theme Keywords: needs-testing needs-refresh
Focuses: css Cc:

Description

Steps to reproduce the issue:-
Activate Twenty Ten Theme.
Choose Table block.
Add some text to the table.
Now change the font size and check it on both the side editor and user side.
You can able to see the change on the front side but the editor side have no change even after applying a different style font size.
I have attached a video for better understanding.
Video URL:- https://video.drift.com/v/abqA2x1QjxW/

Attachments (1)

58362.diff (1.4 KB) - added by sabernhardt 3 months ago.
inherits font size in header and data cells when customized for Table or Calendar blocks, using a relative line-height

Download all attachments as: .zip

Change History (11)

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


13 months ago
#1

  • Keywords has-patch added

#2 @bijit027
13 months ago

I am currently using twenty-fifteen themes and here I also faced the same issue. I think many themes have similar issues.
here is the video link: https://drive.google.com/file/d/1wgE8umFUKzidPu4MZK-rsorCCrOmnf0E/view?usp=share_link

PHP version: 8.1.13
WordPress: 6.2.1

#3 @iamfarhan09
10 months ago

  • Keywords needs-dev-note needs-testing added

#4 @iamfarhan09
10 months ago

  • Severity changed from normal to critical

#5 @sabernhardt
3 months ago

  • Component changed from Editor to Bundled Theme
  • Focuses css added
  • Keywords needs-dev-note removed
  • Severity changed from critical to normal
  • Summary changed from Twenty Ten - Table block having issue with font size on editor side. to Twenty Ten: Table block having issue with font size on editor side

#6 @sabernhardt
3 months ago

Hi and thanks for the report!

For this and any other tickets related to font size in tables, I made a set of Table and Calendar blocks. Changes to one of the blocks can affect the other, or one may need the same type of change as the other.

PR 4478 would change the default font size for anyone who likes it the way it is. It also does not adjust the header cells on the front end (which would need a relative line-height instead of pixel dimensions to accommodate larger font sizes).

@sabernhardt
3 months ago

inherits font size in header and data cells when customized for Table or Calendar blocks, using a relative line-height

#7 @sabernhardt
3 months ago

58362.diff follows the pattern of [57897], applying it to both the Table and Calendar blocks.

The line-height values probably should have been relative in the main stylesheet for any elements to work with larger font sizes, but I only added 1.5 for these blocks to match the equivalent pixel dimensions:

#content,
#content input,
#content textarea {
  font-size: 16px;
  line-height: 24px;
}
#content tr th,
#content thead th {
  font-size: 12px;
  line-height: 18px;
}

#8 @karmatosed
2 months ago

  • Milestone changed from Awaiting Review to Future Release

#9 @karmatosed
2 months ago

  • Keywords needs-refresh added; has-patch removed

@sabernhardt I am having a little issue getting this patch to work today, would you be able to confirm it is working for you with the latest version of WordPress please?

#10 @sabernhardt
2 months ago

I applied the patch (SVN), and the editor (both iframe and v2) was showing the special font sizes. However, I needed to clear cache to see the updated styles on the front (blocks.css).

Note: See TracTickets for help on using tickets.