Refined alignment styles#4534
Open
girishpanchal30 wants to merge 1 commit into
Open
Conversation
Collaborator
There was a problem hiding this comment.
Pull request overview
This PR refines the .alignfull/.alignwide reset rules in the frontend Gutenberg stylesheet to fix a layout regression (issue #4531) where wide/full blocks nested inside an Otter "Section" block were forced edge-to-edge and lost their side gutter. It replaces the broad [class*="wp-block-"]:has(> [class*="wp-block-"]) catch-all — which matched every namespaced third-party block — with a targeted selector scoped to sidebar layouts and the Otter advanced-column class, while keeping the #4427 overlap fix intact for non-Columns blocks.
Changes:
- Replaced the broad nested-block
:has()catch-all reset with explicit selectors for.nv-sidebar-left/.nv-sidebar-rightand.wp-block-themeisle-blocks-advanced-column. - Added
:not(.wp-block-columns)so wide/full Columns blocks nested in an Otter Section retain their gutter, resolving the reported regression. - Preserved the
width/max-width: 100%; margin: autoreset for the remaining (non-Columns) nested cases to keep issue #4427 fixed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Soare-Robert-Daniel
approved these changes
Jul 3, 2026
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.
Summary
Refined the alignfull and alignwide styles for better compatibility with sidebars and nested blocks.
Check before Pull Request is ready:
Closes #4531