Opened 6 weeks ago
Last modified 2 weeks ago
#62678 new defect (bug)
Twenty Twenty: Letter spacing applied to Media & Text Block does not affect inner paragraph on editor side
Reported by: | pitamdey | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch has-screenshots has-testing-info |
Focuses: | css | Cc: |
Description
In Theme Twenty Twenty,
The Letter spacing setting is not working on the editor side when we select the Media & Text Block and try to change the letter spacing value
Attachments (4)
Change History (12)
#1
@
6 weeks ago
Hi @pitamdey,
I can confirm that I was able to reproduce the issue when selecting the Media & Text block. However, it worked correctly when I selected the paragraph tag inside the Media & Text block and then adjusted the letter spacing.
This ticket was mentioned in Slack in #core-test by oglekler. View the logs.
6 weeks ago
#3
@
6 weeks ago
- Keywords has-testing-info added
- Version set to 6.7.1
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/62678/62678.patch
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: Windows 10/11
- Theme: Twenty Twenty 2.8
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
Additional Notes
Test reproduction steps were not clear at first here are some:
- After setting Twenty Twenty
- Create a new Post
- Add a Media & Text block
- Put some text in the paragraph block from this Media & Text block
- Click on the image (hence you are clicking on the whole Media & Text widget), go to styles, typography, add Letter spacing, for example 50.
- Save the Post
- Check the post in the Post Loop
- ✅ Bug Occurs (you can see in the post loop the issue, but not in Gutenberg)
IMPORTANT: This only happens if you apply the Letter spacing to the whole block clicking on the image, not in the paragraph of the Media & Text block.
After applying the patch, I can confirm that the issue is solved, I can see the text is rendered correctly as expected in Gutenberg.
Supplemental Artifacts
After patch: https://i.imgur.com/J9LScml.png
#4
follow-up:
↓ 6
@
3 weeks ago
Hi
This change affects all paragraphs and list on the editor side, not only the Media & Text block. But because "normal" is the default value for letter-spacing, I think that removing it is probably safe.
In an earlier version of the theme, this style also existed in style.css and style-rtl.css.
https://github.com/WordPress/twentytwenty/blob/master/style.css#L3489
In style.css it was moved from entry-content p
to entry-content
before the theme was merged in to WordPress, so the specificity was lowered. But it was not updated in the editor styles. This might just have been missed until now.
#5
@
3 weeks ago
- Keywords needs-refresh added
I am unable to apply the patch, I am getting the message "Assertion failed".
Perhaps there is a merge conflict or maybe it is because the src
directory is missing from the path.
#6
in reply to:
↑ 4
@
2 weeks ago
- Focuses css added
- Summary changed from Twenty Twenty : Letter spacing is not working in Media & Text Block on editor side to Twenty Twenty: Letter spacing applied to Media & Text Block does not affect inner paragraph on editor side
- Version 6.7.1 deleted
In style.css it was moved from
entry-content p
toentry-content
#49318 changed the front-end selector.
But because "normal" is the default value for letter-spacing, I think that removing it is probably safe.
Without letter-spacing: normal
, then regular paragraphs and lists would have a negative letter spacing. Moving -0.015em
to the .editor-styles-wrapper > *
ruleset could be appropriate enough (in addition to 62678.patch), but another approach might be better:
- Assign the Inter sans-serif font and negative letter-spacing to
.editor-styles-wrapper
(reflectingbody
on front). - Assign the Hoefler Text serif font and normal letter-spacing to
.wp-block-post-content
and.block-editor-block-list__layout > p
(reflecting.entry-content
and.widget_text p
on front).
Previously: [55967] and [58908] made adjustments for the Quote and Pullquote blocks (only).
#7
@
2 weeks ago
- Keywords needs-refresh removed
62678.changing-selectors.patch shows the alternative approach. It could still need work; at least the .wp-block-post-content
required another class name (such as .edit-post-visual-editor
) for older WordPress versions.
Editor View