Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/blockparty-tabs/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
}
}

.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.


&-panel-item {

Expand Down
24 changes: 12 additions & 12 deletions src/blockparty-tabs/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,23 @@
justify-content: end;
}

.has-align-sidebar-left &,
.has-align-sidebar-right & {
.has-align-sidebar-left > &,
.has-align-sidebar-right > & {
flex-wrap: wrap;
}

.has-align-sidebar-left & {
.has-align-sidebar-left > & {
flex: 1 1 33.33333%;
}

.has-align-sidebar-right & {
.has-align-sidebar-right > & {
flex: 1 1 33.33333%;
order: 2;
}

&-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.


&:hover,
&:focus-within {
Expand All @@ -144,7 +144,7 @@
border-left: var(--wp--blockparty--tabs--nav-border);
}

.has-align-sidebar-left & {
.has-align-sidebar-left > & {

&:hover,
&:focus-within {
Expand All @@ -167,13 +167,13 @@

&-panels {

.has-align-sidebar-right & {
.has-align-sidebar-right > & {
flex: 1 1 66.66666%;
align-self: stretch;
order: 1;
}

.has-align-sidebar-left & {
.has-align-sidebar-left > & {
flex: 1 1 66.66666%;
align-self: stretch;
}
Expand All @@ -187,17 +187,17 @@
display: none;
}

.has-align-sidebar-left &,
.has-align-sidebar-right & {
.has-align-sidebar-left > &,
.has-align-sidebar-right > & {
height: 100%;
border-top: 0;
}

.has-align-sidebar-left & {
.has-align-sidebar-left > & {
border-left: var(--wp--blockparty--tabs--panel-border);
}

.has-align-sidebar-right & {
.has-align-sidebar-right > & {
border-right: var(--wp--blockparty--tabs--panel-border);
}
}
Expand Down
Loading