diff --git a/static/app.css b/static/app.css index 309986c..aeab551 100644 --- a/static/app.css +++ b/static/app.css @@ -57,6 +57,10 @@ html[data-theme="light"] { * { box-sizing: border-box; } +/* a jump to #doc-7 lands below the bars that stay in place */ +html { + scroll-padding-top: calc(var(--toph) + 16px); +} body { margin: 0; background: var(--bg); @@ -187,7 +191,16 @@ h2 { grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--toph)); } +/* the sections stay in place under the top bar on pages of any length; a + sidebar taller than the window scrolls on its own */ .side { + position: sticky; + top: var(--toph); + z-index: 10; + align-self: start; + height: calc(100vh - var(--toph)); + height: calc(100dvh - var(--toph)); + overflow-y: auto; display: flex; flex-direction: column; gap: 18px; @@ -1006,7 +1019,13 @@ textarea.mrz { .app { grid-template-columns: minmax(0, 1fr); } + /* on phones the sections are a row that stays under the top bar */ + html { + scroll-padding-top: calc(var(--toph) + 66px); + } .side { + height: auto; + overflow: visible; flex-direction: row; align-items: center; gap: 8px;