The sheet viewer takes the panel, not the screen
Browse files at this commit54615d463d42e2a9880a912c74839397c78dfe03Parent: 1497e10- fix
- the sheet viewer takes the panel, not the screen
1 changed file +27 -6
- style/main.scss +27 -6
style/main.scssmodified+27 -6
| @@ -1232,15 +1232,35 @@ img.avatar { | |||
| 1232 | // A workbook has no element of its own, so the viewer draws it: a tab strip | 1232 | // A workbook has no element of its own, so the viewer draws it: a tab strip |
| 1233 | // when the book has more than one sheet, and a grid that pans inside its own | 1233 | // when the book has more than one sheet, and a grid that pans inside its own |
| 1234 | // box — the document never scrolls. | 1234 | // box — the document never scrolls. |
| 1235 | +// A workbook is wider and taller than anything else the viewer opens, so it | ||
| 1236 | +// takes the panel the whole way out: the modal grows to the viewport and no | ||
| 1237 | +// further, and the grid takes whatever is left under the tab strip and pans | ||
| 1238 | +// inside that — the panel itself never leaves the screen. | ||
| 1239 | +.viewer:has(.viewer-sheet) { | ||
| 1240 | + width: min(96vw, 1400px); | ||
| 1241 | + max-width: min(96vw, 1400px); | ||
| 1242 | + display: flex; | ||
| 1243 | + flex-direction: column; | ||
| 1244 | + overflow: hidden; | ||
| 1245 | + | ||
| 1246 | + .viewer-body { | ||
| 1247 | + flex: 1; | ||
| 1248 | + min-height: 0; | ||
| 1249 | + align-items: stretch; | ||
| 1250 | + padding: 16px 20px 20px; | ||
| 1251 | + } | ||
| 1252 | +} | ||
| 1253 | + | ||
| 1235 | .viewer-sheet { | 1254 | .viewer-sheet { |
| 1236 | display: flex; | 1255 | display: flex; |
| 1237 | flex-direction: column; | 1256 | flex-direction: column; |
| 1238 | gap: 10px; | 1257 | gap: 10px; |
| 1239 | - width: min(86vw, 900px); | 1258 | + width: 100%; |
| 1240 | - // The viewer body is a row flex, so without this the sheet's automatic | 1259 | + // The viewer body is a row flex, so without these the sheet's automatic |
| 1241 | - // minimum size is the whole table's width and a wide book pushes the panel | 1260 | + // minimum size is the whole table's width and height, and a wide book |
| 1242 | - // off the screen instead of panning inside it. | 1261 | + // pushes the panel off the screen instead of panning inside it. |
| 1243 | min-width: 0; | 1262 | min-width: 0; |
| 1263 | + min-height: 0; | ||
| 1244 | } | 1264 | } |
| 1245 | 1265 | ||
| 1246 | .sheet-tabs { | 1266 | .sheet-tabs { |
| @@ -1268,8 +1288,9 @@ img.avatar { | |||
| 1268 | } | 1288 | } |
| 1269 | 1289 | ||
| 1270 | .sheet-grid { | 1290 | .sheet-grid { |
| 1271 | - max-height: 70vh; | 1291 | + flex: 1; |
| 1272 | min-width: 0; | 1292 | min-width: 0; |
| 1293 | + min-height: 0; | ||
| 1273 | overflow: auto; | 1294 | overflow: auto; |
| 1274 | scrollbar-width: none; | 1295 | scrollbar-width: none; |
| 1275 | border: 1px solid var(--border); | 1296 | border: 1px solid var(--border); |
| @@ -1288,7 +1309,7 @@ img.avatar { | |||
| 1288 | padding: 4px 8px; | 1309 | padding: 4px 8px; |
| 1289 | border-right: 1px solid var(--border); | 1310 | border-right: 1px solid var(--border); |
| 1290 | border-bottom: 1px solid var(--border); | 1311 | border-bottom: 1px solid var(--border); |
| 1291 | - max-width: 220px; | 1312 | + max-width: 180px; |
| 1292 | overflow: hidden; | 1313 | overflow: hidden; |
| 1293 | text-overflow: ellipsis; | 1314 | text-overflow: ellipsis; |
| 1294 | white-space: nowrap; | 1315 | white-space: nowrap; |