Skip to content

fix sidebar stye for nested tabs#32

Merged
ptesei merged 1 commit intodevelopfrom
fix/nested-tabs-sidebar
Apr 23, 2026
Merged

fix sidebar stye for nested tabs#32
ptesei merged 1 commit intodevelopfrom
fix/nested-tabs-sidebar

Conversation

@ptesei
Copy link
Copy Markdown
Contributor

@ptesei ptesei commented Apr 23, 2026

Capture d’écran 2026-04-23 à 09 46 25

Note

Low Risk
CSS-only selector specificity change; risk is limited to visual regressions in edge-case nested layouts.

Overview
Fixes nested tabs rendering when using sidebar alignment by changing sidebar-related SCSS selectors from descendant (.has-align-sidebar-* &) to direct-child (.has-align-sidebar-* > &).

This constrains sidebar layout rules (nav/panels flex sizing, borders, and editor panel display: flex) to only the immediate tabs block, preventing parent sidebar alignment styles from leaking into nested tabs.

Reviewed by Cursor Bugbot for commit 3d87836. Bugbot is set up for automated code reviews on this repo. Configure here.

@ptesei ptesei merged commit 45edf35 into develop Apr 23, 2026
2 checks passed
@ptesei ptesei deleted the fix/nested-tabs-sidebar branch April 23, 2026 07:49
@ptesei ptesei restored the fix/nested-tabs-sidebar branch April 23, 2026 07:49
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3d87836. Configure here.

&-item {

.has-align-sidebar-right & {
.has-align-sidebar-right > & {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direct child selector won't match grandchild elements

High Severity

The > (direct child) combinator on &-nav-item and &-panel-item selectors produces selectors like .has-align-sidebar-right > .wp-block-blockparty-tabs-nav-item, which will never match. In the DOM, -nav-item is a child of -nav (not the tabs root), and -panel-item is a child of -panels. These are grandchildren of .has-align-sidebar-right, not direct children. All sidebar-specific styles for nav items (borders, width) and panel items (height, borders) are silently broken.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3d87836. Configure here.

.has-align-sidebar-right &,
.has-align-sidebar-left & {
.has-align-sidebar-right > &,
.has-align-sidebar-left > & {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editor sidebar panel-item selector won't match grandchildren

High Severity

The > combinator in .has-align-sidebar-right > & at the top level of .wp-block-blockparty-tabs produces .has-align-sidebar-right > .wp-block-blockparty-tabs-panel-item (via &-panel-item on line 70). In both editor and frontend DOM, -panel-item is nested inside -panels, making it a grandchild — not a direct child — of the .has-align-sidebar-* element. The display: flex override for active/selected panel items in sidebar mode will never apply in the editor.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3d87836. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants