mirror of
https://github.com/docmost/docmost.git
synced 2026-08-31 19:05:29 +08:00
feat(base): extend inline embed scroll viewport leftward, anchor first cell with grid padding
Bring back the leftward extension via negative margin-left so the scroll viewport reaches AppShell.Main's left edge, then offset the .grid with padding-left = extendLeft so the first cell still lines up with page-content on load. The extended area becomes scrollable empty space the user can pan into — same shape as Notion's inline databases. Done with one new CSS var (--embed-grid-pad-left) consumed by the .grid in grid.module.css. Standalone full-page bases never set the var, so it's a no-op there.
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
border: 1px solid
|
||||
light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-4));
|
||||
border-radius: var(--mantine-radius-sm);
|
||||
/* When the embed wrapper extends the scroll viewport leftward, this
|
||||
* padding pushes the first cell back to page-content alignment so
|
||||
* the table looks aligned on load. The padded area is part of the
|
||||
* scrollable region — the user can pan left into it. Standalone
|
||||
* full-page bases never set the var, so it's a no-op there. */
|
||||
padding-left: var(--embed-grid-pad-left, 0);
|
||||
}
|
||||
|
||||
.headerRow {
|
||||
|
||||
Reference in New Issue
Block a user