diff --git a/index.html b/index.html index 7a77904..814f7c9 100644 --- a/index.html +++ b/index.html @@ -104,6 +104,41 @@ html { scrollbar-gutter: stable; } + + :root { + --df-zoom: 1; + --df-vh: 100vh; + } + + @media (max-width: 1699.98px) { + :root { + --df-zoom: 0.8; + --df-vh: calc(100vh / 0.8); + } + body { + zoom: 0.8; + } + } + + @media (max-width: 1399.98px) { + :root { + --df-zoom: 0.65; + --df-vh: calc(100vh / 0.65); + } + body { + zoom: 0.65; + } + } + + @media (max-width: 999.98px) { + :root { + --df-zoom: 0.5; + --df-vh: calc(100vh / 0.5); + } + body { + zoom: 0.5; + } + } diff --git a/src/App.jsx b/src/App.jsx index c73516e..3315a71 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -47,7 +47,7 @@ class App extends PureComponent { display: 'flex', alignItems: 'center', justifyContent: 'center', - minHeight: '100vh', + minHeight: 'var(--df-vh, 100vh)', bgcolor: 'background.default', }} > diff --git a/src/components/AppShell.jsx b/src/components/AppShell.jsx index fc1999d..7435111 100644 --- a/src/components/AppShell.jsx +++ b/src/components/AppShell.jsx @@ -71,7 +71,7 @@ class AppSidebar extends PureComponent { position: 'sticky', top: 0, alignSelf: 'flex-start', - height: '100vh', + height: 'var(--df-vh, 100vh)', })} > @@ -294,7 +294,7 @@ export default function AppShell() { const activeSub = activeNav ? resolveActiveSub(pathname, activeNav) : null; return ( - + {/* Flex row so the dev inspector docks beside the app instead of overlaying it; the app content shrinks while the panel is open. */} - +