Opened 2 years ago
Last modified 8 months ago
#59706 new defect (bug)
Twenty Twenty: Latest Posts block colors and padding
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 6.3.2 |
| Component: | Bundled Theme | Keywords: | dev-feedback changes-requested has-patch |
| Focuses: | css | Cc: |
Description
Hello Team,
I have worked on the "Twenty Twenty" theme and found that the "Twenty Twenty" theme contains an issue for the "Latest Post" block. The text color does not change when we try to select text color from block settings.
Also, When we select the background color, the padding is added in admin, But in the front end, the post text displays a sticky, The padding is not added for the front end.
Here, I have provided the issue video:
Issue: https://share.cleanshot.com/5mkR0sVQ25VYM6xp434Y
Thanks,
Attachments (5)
Change History (10)
@
2 years ago
I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.
@
2 years ago
Latest Posts block in WordPress 6.4-RC1, with Accent text color (custom green) and Subtle Background background color
#1
@
2 years ago
- Component changed from General to Bundled Theme
- Focuses css added
- Summary changed from Twenty Twenty theme has issue for Latest Posts block. to Twenty Twenty: Latest Posts block colors and padding
WordPress 6.4 adds the chosen text color to the link (only), but the rest of the text remains the theme's color selections. When adding support for color controls, the theme's colors still need to apply for users do not select a color. (Replacing a specific color with inherit would change how existing blocks appear.)
The block-library styles define a padding for blocks with a background color and the left padding of zero, so that would not be exclusive to Twenty Twenty.
This ticket was mentioned in PR #9057 on WordPress/wordpress-develop by @sandeepdahiya.
8 months ago
#5
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/59706
This patch ensures that in twenty-twenty theme -
In the block-editor:
- the Latest Posts, Latest comments, Categories, Categories List blocks correctly apply the user-defined text color (has-text-color) in the block editor. Previously, hardcoded default styles (color: #6d6d6d) prevented selected text colors from rendering. This fix allows color: inherit when .has-text-color is present.
- When users choose a custom text color for the Latest Comments and Latest Posts blocks, the <time> elements (post or comment dates) also reflect that color in the block editor. Without this, only links or titles change color while dates retain the default.
In the frontend:
- The Latest Posts and Latest comments blocks correctly apply the user-defined text color (has-text-color) in the front end. Without this, only links or titles change color while dates retain the default. Since Categories, and Categories List blocks already have <a> links so they reflect color changes by default.
- In the frontend - Latest Posts and Latest comments blocks, the post and comment dates also reflect the user-defined color.
Before patch - Latest posts block in backend and front end
After patch - Latest posts block in backend and front end
Before patch - Latest comment block in backend and front end
After patch - Latest comment block in backend and front end
Test steps in the WordPress admin : -
Go to /wp-admin/ → activate twenty-twenty theme → create or edit a post.
Insert a Latest Posts or Latest comments block.
Set a custom text color.
Preview/save and verify the color is applied correctly on:
Editor side (backend)
Front end of the site
Since padding is defined by block-library styles, so not changing that.
I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.