Repository navigation
Use core has-global-padding for page padding - #159
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Core blocks set to
alignwide(columns, images, tables,<details>) had no side padding on mobile, so card borders, images and captions touched the screen edge. The defect showed up on/themes/marin/,/themes/aviendha/and the themes hub (Oct 6–7, 2026), and each page was fixed by hand by strippingalignwidefrom the content.Root cause:
theme.jsonsets root padding withuseRootPaddingAwareAlignments, but core applies that padding only to elements with thehas-global-paddingclass. Block themes get the class on the content wrapper automatically. Nynaeve's Blade wrappers are written by hand and never had it. Theapp.cssrule:where(.is-layout-constrained) > :not(.alignfull):not(.alignwide)made up for this, but it:alignwide/alignfull, so core wide blocks got nothing, andWhat this does
Page padding now works the same way as in Twenty Twenty-Five, Ollie, Elayne and Aviendha: core does it, with no theme rule.
content-page,content-front-pageandcontent-singlewrappers: addhas-global-padding.app.css: remove the padding rule and itsabout/pricing!importantoverride.theme.json:contentSize55rem → 52rem, which was already the visible text width (55rem minus 2 × 1.5rem). Desktop text width is unchanged.cta-block-blue1.2.0:supports.layoutconstrained, so core pads its content. Core adds the classes at render, so saved markup is unchanged and no block becomes invalid.blockGap: 0intheme.jsonkeeps vertical spacing the same.width: 100%from alignfull block roots (it defeated core's negative margins and the block ended 48px short):cta-block-blue,two-column-card,page-heading-blue,review-profiles,feature-list-grid.feature-list-grid,icon-grid,service-blocks: inner side padding applies only under.alignfull, using--wp--style--root--padding-*.page-heading-blue:box-sizing: content-boxkeeps its text column at content width.CLAUDE.md"Block Padding" rewritten for the core model.CHANGELOG.mdhas an Unreleased entry.Verification
A Playwright script recorded the left/right edges of every content element on 39 local pages and posts at 390px and 1440px, before and after, plus section heights.
/services/wordpress-seo/)./contact/and the service-page CTAs).blockGap: 0.Follow-ups (not in this PR)
theme.jsonlacksdefaultSpacingSizes: false, so core's spacing presets override Nynaeve's (spacing|50= 1.5rem, not the theme's clamp). This is separate and site-wide, so it is not touched here.Version: 4.2.0 (minor, bumped in
style.css,readme.txtandCHANGELOG.md). Rendering changes on every page, and the CTA block gets new layout support.