Skip to content

Commit 7927f8e

Browse files
draganescuclaude
andcommitted
Grid: Give the row resizer the visualizer's z-index again
The grid visualizer no longer remounts after a drag, so it stays below the row resizer, which was mounted after it, without a z-index of its own. The row updates also take `getUpdatedChildLayoutStyle` from `hooks/block-style-state`, so `components/grid` no longer imports `hooks/layout-child`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3933db7 commit 7927f8e

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

‎packages/base-styles/_z-index.scss‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ $z-layers: (
6666
// Below the block toolbar.
6767
".block-editor-grid-visualizer": 30,
6868

69-
// Above the grid visualizer, like the grid item resizer.
70-
".block-editor-grid-row-resizer": 31,
71-
7269
// Show snackbars above everything (similar to popovers)
7370
".components-snackbar-list": 100000,
7471

‎packages/block-editor/src/components/grid/get-grid-row-updates.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { getUpdatedChildLayoutStyle } from '../../hooks/layout-child';
21
import {
32
DEFAULT_BLOCK_STYLE_STATE,
43
getStyleForState,
4+
getUpdatedChildLayoutStyle,
55
hasViewportBlockStyleState,
66
} from '../../hooks/block-style-state';
77
import type { BlockStyle, BlockStyleState } from '../../hooks/types';

‎packages/block-editor/src/components/grid/style.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
.block-editor-grid-row-resizer {
223223
// Specificity to override the z-index and pointer-events set by .components-popover.
224224
&.block-editor-grid-row-resizer.block-editor-grid-row-resizer {
225-
z-index: z-index(".block-editor-grid-row-resizer");
225+
z-index: z-index(".block-editor-grid-visualizer");
226226

227227
.components-popover__content * {
228228
pointer-events: none;

0 commit comments

Comments
 (0)