Feat v0.6.10 viewport foundation
Some checks failed
CI/CD / test-frontend (pull_request) Has been cancelled
CI/CD / test-sqlite (pull_request) Has been cancelled
CI/CD / test-go-pg (pull_request) Has been cancelled
CI/CD / build-and-deploy (pull_request) Has been cancelled
CI/CD / detect-changes (pull_request) Has been cancelled

Single layout model: body → shell → surface. CSS zoom replaces
transform: scale() — no more getBoundingClientRect hacks. Extension
surfaces use height: 100% instead of 100vh. All viewport-height
declarations use 100dvh fallbacks for mobile browsers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-01 10:28:35 +00:00
parent 617d81e7d4
commit 4dd3fe622e
19 changed files with 94 additions and 87 deletions

View File

@@ -37,20 +37,11 @@ export function AppearanceSection() {
p.scale = scale;
localStorage.setItem('sb-appearance', JSON.stringify(p));
// Apply scale to content area only (not shell/nav)
// Apply scale to content area only (not shell/nav).
// CSS zoom reflows layout correctly — no getBoundingClientRect hacks needed.
const inner = document.getElementById('surfaceInner');
if (inner) {
if (scale !== 100) {
const s = scale / 100;
inner.style.transform = `scale(${s})`;
inner.style.transformOrigin = 'top left';
inner.style.width = (100 / s) + '%';
inner.style.height = (100 / s) + '%';
} else {
inner.style.transform = '';
inner.style.width = '';
inner.style.height = '';
}
inner.style.zoom = scale !== 100 ? (scale / 100) : '';
}
sw.emit('toast', { message: 'Appearance saved', variant: 'success' });