Opened 3 years ago
Last modified 3 weeks ago
#59957 new defect (bug)
Twenty Twenty and Twenty Twenty-One: Details block padding issue when setting its alignment to full-width
| Reported by: | viralsampat | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Bundled Theme | Version: | 6.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | css |
Description
Hello Team,
I have worked on the "Twenty Twenty" theme and found that the "Twenty Twenty" theme contains an issue for the "Details" block. The padding is not displaying properly on the back-end side. The front-end side looks good. When we set "Full Width" from the components toolbar group
Here, I have provided screenshots:
Front-end:
Thanks,
Attachments (1)
Change History (6)
#1
@
3 years ago
- Component Themes → Bundled Theme
- Keywords dev-feedback removed
- Summary Twenty Twenty Theme: Details block padding issue when setting its alignment to full-width → Twenty Twenty and Twenty Twenty-One: Details block padding issue when setting its alignment to full-width
The max-width would need to be changed, not the margins.
I think this would work for both themes (in editor styles):
.wp-block-details > .wp-block {
max-width: 100%;
}
#4
@
3 weeks ago
- Keywords needs-refresh added; needs-patch removed
Goodness this has sat for a little while, let's see what we can do about getting this moving. To summarise. The front end is already right for this theme. In the editor, a full-width Details block stays narrow.
I would suggst what is needed, would be a fix to the max-width in the editor styles for Twenty Twenty and Twenty Twenty-One. Do not change the margins, and do not change the front end. The current patch needs to be redone as a result of this to get that resolved.
This ticket was mentioned in PR #14738 on WordPress/wordpress-develop by @irozum.
3 weeks ago
#5
- Keywords has-patch added; needs-refresh removed
Summary
In the block editor, a Details block set to full width stays at the narrow content width in Twenty Twenty and Twenty Twenty-One, while the front end is already correct.
The generic .wp-block { max-width: ... } editor rule also constrains the children of the Details block. This adds .wp-block-details > .wp-block { max-width: 100%; } to the editor styles of both themes, as suggested in the ticket. Margins and front-end styles are untouched.
- Twenty Twenty:
editor-style-block.cssand its RTL counterpart. - Twenty Twenty-One: new
details/_editor.scsspartial imported inblocks-editor.scss, plus the compiledstyle-editor.css.
Testing instructions
- Use Twenty Twenty or Twenty Twenty-One and add a Details block with some content in the editor.
- Set its alignment to Full width.
- Before: the block stays narrow in the editor. After: it fills the full width, matching the front end.
CSS-only change, so there is no automated test. I did not run a browser check of the editor.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 5.5
Used for: Implementation and PR description.
---
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This issue is happening with Twenty twenty and twenty twenty one also I have applied the patch which can resolve the issue for both the themes.