Repository navigation
Navigation: keep custom CSS off inner list containers (#84881) - #85367
Conversation
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> (cherry picked from commit 97f7da4)
🤖 PR meta 🤖🎉 PropsIf 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. Updated as activity occurs, without notifying anyone named here. Add the ⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Regression: updating a specific option will only change its value and will not corrupt others in
|
|
This failing test is unrelated and failing on all committed branches to https://github.com/WordPress/gutenberg/commits/wp/7.2/ |
There was a problem hiding this comment.
🟢 Approval recommended
The focused rendering change has regression coverage and no identified blocking issues; tests were not executed during this review.
No open issues 🎉
What changed in this PR
Backports the Navigation custom CSS fix to wp/7.2, keeping Additional CSS on the outer wrapper rather than duplicating it on inner lists.
Changes:
- Removes the outer Navigation block’s generated custom CSS class from its local list containers.
- Adds a regression test verifying wrapper-only application.
- Records the fix under the block-library changelog’s Unreleased section.
| File | Description |
|---|---|
phpunit/blocks/render-block-navigation-test.php |
Adds regression coverage for wrapper-only custom CSS. |
packages/block-library/src/navigation/index.php |
Removes the duplicated custom CSS class from inner containers. |
packages/block-library/CHANGELOG.md |
Documents the Navigation fix. |
Review effort: Balanced
Cherry-pick of #84881 into
wp/7.2, after the failed automatic cherry-pick.The only conflict was in
packages/block-library/CHANGELOG.md. I added the #84881 entry under Unreleased and left out the #85244 entry, which is not on this branch. The PHP changes are identical to trunk.Use of AI Tools
Claude Code did the cherry-pick and resolved the changelog conflict.