From 2232981753e137adb9c725c628163a88d1345fe0 Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Mon, 24 Aug 2026 11:13:13 +0200 Subject: [PATCH] fix tfe.php scroll: make .tfe-main a flex container so the height chain resolves MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .tfe-main (main) is a block container by default, so .tfe-layout's height:100% and .tfe-content-row's flex:1 never resolved to a definite height. The columns' overflow-y:auto thus had nothing to constrain, and main's overflow:hidden clipped the content — scroll was visually broken. Adding display:flex lets the column/height chain resolve so both columns scroll independently as intended. --- app/public/assets/css/tfe.css | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/app/public/assets/css/tfe.css b/app/public/assets/css/tfe.css index cff3d8f..7a33110 100644 --- a/app/public/assets/css/tfe.css +++ b/app/public/assets/css/tfe.css @@ -7,6 +7,31 @@ flex: 1; min-height: 0; overflow: hidden; + display: flex; + flex: 1; + min-height: 0; + overflow: hidden; + /* Left padding keeps content aligned with the rest of the page; + no right padding so the right column (and its scrollbar) sits + flush against the viewport edge. */ + padding-left: var(--space-m); +} + +/* Stacked article layout — fills main height */ +.tfe-layout { + display: flex; + flex-direction: column; + gap: var(--space-xl); + width: 100%; + height: 100%; + min-height: 0; +} + +/* Row 1: Author above Title (kept for backward compat, no longer used) */ +.tfe-header-row { + display: flex; + flex-direction: column; + gap: var(--space-3xs); } /* Two-column layout: left 40vw (info), right fills remaining (files) */ @@ -36,6 +61,28 @@ } /* Files container inside right column — flex kept for PDF expand-to-fill behavior */ + display: flex; + flex-direction: column; + overflow-y: auto; + min-width: 0; + padding-top: var(--space-l); + padding-bottom: var(--space-xl); +} + +/* Left column: stacks author, title, meta, synopsis — scrolls independently */ +.tfe-left-column { + gap: var(--space-m); + /* space between content and the column scrollbar */ + padding-right: var(--space-xs); +} + +/* Right column: static (no padding), scrollbar pinned to the far right edge */ +.tfe-right-column { + /* no horizontal padding — the inner .tfe-files carries the gutter */ +} + +/* Files container inside right column: padded on the right so content + sits clear of the column's right-edge scrollbar */ .tfe-files { display: grid; gap: var(--space-m); @@ -43,6 +90,12 @@ .tfe-files:has(.pdf-expanded) { height: 100%; + display: flex; + flex-direction: column; + gap: var(--space-m); + flex: 1; + min-height: 0; + padding-right: var(--space-xs); } .tfe-file-item {