From 9be0fe662616d278bf9b35c13a65eebfbde49252 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Mon, 14 Sep 2026 20:46:35 -0400 Subject: [PATCH] fix(viewer): gouttiere de numeros de ligne synchronisee au scroll en mode pretty print --- frontend/style.css | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/style.css b/frontend/style.css index a88ac45..a9eea4b 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -2054,43 +2054,48 @@ select { /* --- Pretty print (mode lecture fichiers texte non-markdown) --- */ .pretty-view { - display: flex; + position: relative; + display: grid; + grid-template-columns: auto 1fr; + align-items: stretch; background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; - overflow: hidden; + overflow: auto; max-height: 78vh; } .pretty-view .pp-gutter { - flex: 0 0 auto; + position: sticky; /* figee au scroll horizontal, suit le scroll vertical */ + left: 0; + z-index: 2; display: flex; flex-direction: column; padding: 16px 10px 16px 14px; text-align: right; font-family: "JetBrains Mono", monospace; - font-size: 0.8rem; + font-size: 0.85rem; line-height: 1.55; color: var(--text-muted); opacity: 0.65; user-select: none; background: var(--bg-secondary); border-right: 1px solid var(--border); - overflow: hidden; + box-sizing: border-box; } .pretty-view .pp-pre { - flex: 1 1 auto; margin: 0 !important; border: none !important; border-radius: 0 !important; background: transparent !important; padding: 16px !important; - overflow: auto; + overflow: visible; } .pretty-view .pp-pre code { font-family: "JetBrains Mono", monospace; font-size: 0.85rem; line-height: 1.55; white-space: pre; + display: block; } /* Niveaux de log colorises par le fallback pretty-print (pas d'equivalent hljs) */ .pretty-view .pp-level {