fix(advertising): toggle spacing under category autocomplete#4686
Open
fix(advertising): toggle spacing under category autocomplete#4686
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the Advertising > Display Ads > Settings wizard styling to restore the visual gap between the Category/Tag autocomplete inputs and the immediately-following toggles on WordPress 7.0 (where FormTokenField no longer provides default bottom spacing).
Changes:
- Add a narrowly scoped adjacent-sibling CSS rule to apply
margin-top: 16pxtoToggleControlwhen it directly followsCategoryAutocompletewithin the Display Ads wizard.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
laurelfulford
approved these changes
Apr 30, 2026
Contributor
laurelfulford
left a comment
There was a problem hiding this comment.
That looks much better, and no other changes were introduced! 🚢
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.
All Submissions:
Changes proposed in this Pull Request:
The
All tag archive pagesandAll category archive pagestoggles in Advertising > Display Ads > Settings sit flush against the inputs above them on WordPress 7.0. The 7.0 Gutenberg components dropped the default bottom margin fromFormTokenField(whichCategoryAutocompletewraps), so the toggle ends up touching the autocomplete with no gap.This adds a 16px top margin to any
ToggleControlthat immediately follows aCategoryAutocompleteinside the Display Ads wizard, restoring the previous spacing. Scope is intentionally narrow – only the wizard root, only the adjacent-sibling pair.Closes NEWS-1681.
How to test the changes in this Pull Request:
All tag archive pagestoggle has a visible gap (~16px) between it and the Tags to suppress ads on input above.All category archive pagestoggle has the same gap above it.Other information: