Make WordPress Core

Opened 15 months ago

Closed 5 weeks ago

Last modified 3 weeks ago

#58362 closed defect (bug) (fixed)

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

Reported by: iamfarhan09's profile iamfarhan09 Owned by: karmatosed's profile karmatosed
Milestone: 6.7 Priority: normal
Severity: normal Version: 6.2
Component: Bundled Theme Keywords: commit
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 4 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 (16)

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


15 months ago
#1

  • Keywords has-patch added

#2 @bijit027
15 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
12 months ago

  • Keywords needs-dev-note needs-testing added

#4 @iamfarhan09
12 months ago

  • Severity changed from normal to critical

#5 @sabernhardt
4 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
4 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
4 months ago

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

#7 @sabernhardt
4 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
4 months ago

  • Milestone changed from Awaiting Review to Future Release

#9 @karmatosed
4 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
4 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).

#11 @karmatosed
5 weeks ago

  • Owner set to karmatosed
  • Status changed from new to assigned

#12 @karmatosed
5 weeks ago

I am going to try and test this now we have instructions thank you @sabernhardt.

#13 @karmatosed
5 weeks ago

  • Keywords commit added

#14 @karmatosed
5 weeks ago

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

In 58633:

Twenty Ten: Fixes table and calendar block font size issues.

The table and calendar block font sizes were not the same on front and in editor. This resolves in using relative line-height.

Props iamfarhan09, bijit027, sabernhardt.
Fixes #58362.

#15 @sabernhardt
3 weeks ago

  • Keywords needs-testing needs-refresh removed
  • Milestone changed from Future Release to 6.7
Note: See TracTickets for help on using tickets.