Repository navigation
Add option for clipping Group block content based on border radius of root Group block - #87176
Vedant-Gandhi wants to merge 2 commits into
Conversation
🤖 PR meta 🤖🎉 PropsUnlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @porg. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
What?
Closes #52559.
Adds an opt-in "Clip content to rounded corners" setting to the Group block, in the Border panel.
Why?
A Group's border radius rounds the Group itself, but nested blocks with their own background still show square corners that stick out of it. Today the only fix is custom CSS.
How?
hasClippedContentattribute. When it's on,saveadds thehas-clipped-contentclass, which setsoverflow: clip(withoverflow: hiddenas a fallback).Testing Instructions
Screenshots or screencast
Use of AI Tools
I used Claude Sonnet 5.5 to debug the code, find exact file and pair test the code, the changelog entry and the PR description. I have reviewed everything and checked that there are no unintended side effects from AI.