feat(base): keep New row button sticky during horizontal scroll

Add position: sticky + inset-inline-start to .addRowButton so the
'New row' affordance stays at the page-content edge while the user
scrolls horizontally — same shape as the toolbar staying put. The
sticky offset uses the existing --embed-grid-pad-left var: in embed
mode that's the leftward extension distance (so it sticks at
page-content-left); in standalone mode the var is 0 (sticks at the
grid's natural left edge, no visible effect when there's no scroll).

Add a body-color background and z-index: 4 so cells don't bleed
through during scroll.
This commit is contained in:
Philipinho
2026-04-27 04:30:04 +01:00
parent 7a119010c7
commit a992fa8a63
@@ -252,6 +252,18 @@
user-select: none;
transition: background-color 150ms ease;
grid-column: 1 / -1;
/* Stick to the page-content edge during horizontal scroll so the
* "New row" affordance is always reachable, just like the toolbar.
* In embed mode --embed-grid-pad-left is the offset that maps to
* page-content-left; in standalone mode the var is 0 so the button
* sticks at the grid's natural left edge. */
position: sticky;
inset-inline-start: var(--embed-grid-pad-left, 0);
background-color: light-dark(
var(--mantine-color-body),
var(--mantine-color-dark-7)
);
z-index: 4;
}
.addRowButton:hover {