Opened 6 weeks ago
Last modified 5 weeks ago
#62965 new defect (bug)
Twenty Ten: Details block having font-size issue in editor side
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | css | Cc: |
Description
Steps to reproduce the issue :-
- Activate Twenty Ten theme.
- Choose Details block.
- Add some text.
You can able to see that hidden text font-size is different in editor side it is working fine in front side but editor side font-size is different.
Attachments (4)
Change History (6)
@
5 weeks ago
Post editor: Details block with a paragraph inside, displaying the summary text too small
@
5 weeks ago
Widget editor: Details block with a paragraph inside, displaying the paragraph in the larger size used for post content
#1
@
5 weeks ago
- Focuses css added
- Summary changed from Twenty Ten :- Details block having font-size issue in editor side for hidden text. to Twenty Ten: Details block having font-size issue in editor side
The theme's (block) editor styles could be fixed, but I do not agree about decreasing the font size (or the line-height
) of paragraphs in the Details block.
On the front end, the inner paragraph matches the font size of the summary
:
- 16px in the main content area
- 12px in widgets
In the editor, the summary
is 12px and standard paragraphs are 16px, whether you are editing a post or widgets. Twenty Ten's (Classic) editor stylesheet sets a body
font size of 12px. Then it sets common elements to 16px: p
, dl
, td
, th
, ul
, ol
, and blockquote
. As a result, the font-size
discrepancy can happen with div
elements too, including Button and File blocks.
Instead of trying to match font size one way in the post editor plus another way when editing widgets, I propose a smaller edit: updating the body
size to 16px. It would not match the front for widgets, but I prefer that discrepancy over having the text so small in the editor (and elements such as paragraphs and lists have been larger in the widget editor since WordPress 5.8 introduced blocks for widgets).
This ticket was mentioned in PR #8349 on WordPress/wordpress-develop by @sabernhardt.
5 weeks ago
#2
- Keywords has-patch added
- Increases font size for
body
,input
andtextarea
elements in the editor, to match the#content
area on the front. - Updates the
line-height
to a unitless value.
In the post content area, the 16px
font size also:
- Matches the front for elements that inherit the font size from
body
, such assummary
in the Details block. - Corrects
div
elements with relative font sizes, such as Button and File blocks. - Corrects standard
div
elements within the Classic Editor.
Widget text is smaller than this on the front, but fixing that would be more complicated for little value (and it could be a follow-up effort _if_ it is worth doing).
Front end: Details blocks with a paragraph inside, both in the post and in a widget area