Teach Studio Code to pad cards and non-constrained full-width sections - #4778
Merged
Conversation
…s so text never touches edges Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 task
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.
Related issues
How AI was used in this PR
Claude Code investigated the cause (scanned 33 locally agent-built sites, checked the WordPress core layout CSS that governs horizontal padding), wrote the skill wording, and ran three DeepSeek V4 Flash builds with the change in place. The wording was reviewed by hand.
Proposed Changes
Studio Code regularly produces sections and cards whose text sits flush against the edge of their own background, border, or the viewport, which makes an otherwise good build feel unfinished. This is not model randomness: WordPress block themes supply horizontal padding in exactly one place (the root gutter on full-width constrained groups) and explicitly zero it on constrained groups nested inside them. Cards, tinted panels, columns with a background, and full-width sections using a
default/flex/gridlayout get nothing, and block themes never load core's fallback.has-backgroundpadding. None of the agent's skills mentioned this. In a scan of 33 agent-built pages on one machine, half of the card-like boxes and a third of the non-constrained full-width sections had no horizontal padding at all.This PR adds a short "Horizontal Padding" note to the
block-contentskill, telling the agent which boxes must own their padding and how (class padding instyle.css, the root-padding token for non-constrained full-width sections, or a constrained inner group), and adds a matching checklist item plus a recurring-issue entry to thevisual-polishskill so the verification pass inspectspadding-left/padding-righton those boxes. No prompt, tool, or eval changes; 14 lines of skill text.Testing Instructions
Pre-merge Checklist
🤖 Generated with Claude Code