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: 4 additions & 0 deletions packages/base-styles/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Breaking Changes

- Remove `.components-button {:focus or .is-primary}` from the `z-index()` helper ([#77621](https://github.com/WordPress/gutenberg/pull/77621)).

## 6.20.0 (2026-04-15)

## 6.19.0 (2026-04-01)
Expand Down
3 changes: 0 additions & 3 deletions packages/base-styles/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ $z-layers: (
".has-child .wp-block-navigation__submenu-container": 28,
".has-child:hover .wp-block-navigation__submenu-container": 29,

// Active pill button
".components-button {:focus or .is-primary}": 1,

// The draggable element should show up above the entire UI
".components-draggable__clone": 1000000000,

Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/button-group/style.scss
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Won't bother to add stacking context isolation like #77619, since this component is long deprecated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we add a CHANGELOG entry about inling z-index, for the same reasons highlighted in https://github.com/WordPress/gutenberg/pull/77619/changes#r3137231279 ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Only the @wordpress/base-styles package needs a changelog, and here's my reasoning: @wordpress/base-styles is a package used at build time. A consumer usage can only possibly break when they update the @wordpress/base-styles package in their project (their z-index reference will be gone), or if we actually change the z-index value in ButtonGroup. Since we're not changing the z-index value in ButtonGroup, the only possible breakage opportunity is when a consumer updates their @wordpress/base-styles.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@use "@wordpress/base-styles/colors" as *;
@use "@wordpress/base-styles/variables" as *;
@use "@wordpress/base-styles/z-index" as *;

.components-button-group {
display: inline-block;
Expand Down Expand Up @@ -28,7 +27,7 @@
&:focus,
&.is-primary {
position: relative;
z-index: z-index(".components-button {:focus or .is-primary}");
z-index: 1;
}

// The active button should look pressed.
Expand Down
Loading