From 54615d463d42e2a9880a912c74839397c78dfe03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 30 Aug 2026 03:53:50 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20fix(web):=20the=20sheet=20viewer?= =?UTF-8?q?=20takes=20the=20panel,=20not=20the=20screen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A workbook is wider and taller than anything else the viewer opens. The panel now grows to the viewport and no further, the grid takes whatever is left under the tab strip and pans inside that, and the viewer runs to 96vw for a sheet so more columns land on screen. Cells cap at 180px. --- style/main.scss | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/style/main.scss b/style/main.scss index ceeee6a..528a37c 100644 --- a/style/main.scss +++ b/style/main.scss @@ -1232,15 +1232,35 @@ img.avatar { // A workbook has no element of its own, so the viewer draws it: a tab strip // when the book has more than one sheet, and a grid that pans inside its own // box — the document never scrolls. +// A workbook is wider and taller than anything else the viewer opens, so it +// takes the panel the whole way out: the modal grows to the viewport and no +// further, and the grid takes whatever is left under the tab strip and pans +// inside that — the panel itself never leaves the screen. +.viewer:has(.viewer-sheet) { + width: min(96vw, 1400px); + max-width: min(96vw, 1400px); + display: flex; + flex-direction: column; + overflow: hidden; + + .viewer-body { + flex: 1; + min-height: 0; + align-items: stretch; + padding: 16px 20px 20px; + } +} + .viewer-sheet { display: flex; flex-direction: column; gap: 10px; - width: min(86vw, 900px); - // The viewer body is a row flex, so without this the sheet's automatic - // minimum size is the whole table's width and a wide book pushes the panel - // off the screen instead of panning inside it. + width: 100%; + // The viewer body is a row flex, so without these the sheet's automatic + // minimum size is the whole table's width and height, and a wide book + // pushes the panel off the screen instead of panning inside it. min-width: 0; + min-height: 0; } .sheet-tabs { @@ -1268,8 +1288,9 @@ img.avatar { } .sheet-grid { - max-height: 70vh; + flex: 1; min-width: 0; + min-height: 0; overflow: auto; scrollbar-width: none; border: 1px solid var(--border); @@ -1288,7 +1309,7 @@ img.avatar { padding: 4px 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); - max-width: 220px; + max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;