Opened 2 months ago
Last modified 2 months ago
#65306 new defect (bug)
Twenty Thirteen: ".sidebar .entry-meta" selector is too broad, compresses block-rendered entry-meta
| Reported by: | gustavohappyeng | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Bundled Theme | Version: | 3.6 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | ui, css |
Description
In wp-content/themes/twentythirteen/style.css (and rtl.css), the rule:
.sidebar .entry-header,
.sidebar .entry-content,
.sidebar .entry-summary,
.sidebar .entry-meta {
max-width: 1040px;
padding: 0 376px 0 60px;
}
applies a 376px right padding to any descendant .entry-meta (or .entry-content / .entry-summary / .entry-header) when the Secondary Widget Area is active. When a block outputs .entry-meta markup (for example a third-party block plugin that emits the same class), it inherits the padding and is squeezed into ~168px of usable width, even though it has no relation to the theme's classic-template .entry-meta.
Steps to reproduce
- Activate Twenty Thirteen on a self-hosted install.
- Add a widget to the Secondary Widget Area (this activates the
.sidebarclass). - Create a page or post containing a block that renders
<div class="entry-meta">…</div>. A Custom HTML block with the following content reproduces it without any extra plugin:<div class="entry-meta">By <a href="#">Author</a> • <time>May 21, 2026</time></div>
- View the page. The author/date line is squeezed into ~168px on the left side of the content column.
Reproduced on a vanilla self-hosted WordPress install with Twenty Thirteen 4.6.
Expected behavior
The .sidebar .entry-meta rule should only style the theme's own classic-template .entry-meta (the one that is a direct child of .hentry). Block-rendered .entry-meta nested elsewhere in the document should not inherit the 376px / 60px padding.
Proposed fix
Scope each selector to a direct child of .hentry:
.sidebar .hentry > .entry-header,
.sidebar .hentry > .entry-content,
.sidebar .hentry > .entry-summary,
.sidebar .hentry > .entry-meta {
max-width: 1040px;
padding: 0 376px 0 60px;
}
Same change mirrored in rtl.css. The theme's own classic templates emit .entry-meta as a direct child of .hentry, so the existing layout is preserved. Block-emitted .entry-meta nested inside other wrappers no longer matches.
A GitHub PR with the patch is open against WordPress/wordpress-develop: https://github.com/WordPress/wordpress-develop/pull/11929 — I will add a comment with the patch link once this ticket is filed.
Change History (2)
This ticket was mentioned in PR #11929 on WordPress/wordpress-develop by @gustavohappyeng.
2 months ago
#1
- Keywords has-patch added
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
## Description
In
wp-content/themes/twentythirteen/style.css(andrtl.css), the rule:applies a 376px right padding to any descendant
.entry-meta(or.entry-content/.entry-summary/.entry-header) when the Secondary Widget Area is active. Block-rendered.entry-metamarkup (e.g. emitted by a block plugin that uses the same class) inherits the padding and is squeezed into ~168px of usable width.This PR scopes each selector to a direct child of
.hentry, so only the theme's own classic-template.entry-metais affected. Block-emitted.entry-metanested elsewhere no longer matches.## Steps to reproduce
## Verification
.entry-meta: no longer compressed..entry-meta+.entry-contentstill 376px right padding / 1040px max-width.rtl.css): mirrored fix; theme own meta retains the inverted padding.## Files
src/wp-content/themes/twentythirteen/style.csssrc/wp-content/themes/twentythirteen/rtl.css