toc: add independent scrollbar for desktop TOC sidebar

- Added max-height, overflow-y: auto, overscroll-behavior: contain,
  and scrollbar-width: thin to .toc in the desktop media query (toc.css)
- This gives the TOC its own scrollbar when its content exceeds the
  viewport height, scrolling independently from the main content
- Affects both public pages (about, charte, licence via .page-content)
  and admin pages (acces, parametres, contenus via .admin-main--toc)
This commit is contained in:
Pontoporeia
2026-07-03 15:29:05 +02:00
parent e6a989bb36
commit 42c4e78df6
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -1,2 +1,3 @@
- [x] Fix markdown cheatsheet modal 500 error — missing `require_once bootstrap.php` in `app/public/admin/markdown-cheatsheet-fragment.php`
- [x] Add `padding-bottom` to `.md-cheatsheet-dialog` so last table row isn't flush against dialog edge
- [x] Add independent scrollbar for TOC in charte/licence/apropos + admin pages (max-height + overflow-y: auto on .toc desktop)
+5 -1
View File
@@ -110,12 +110,16 @@
opacity: 0.8;
}
/* ── Desktop: sticky sidebar ───────────────────────────────────────────── */
/* ── Desktop: sticky sidebar with independent scroll ──────────────────── */
@media (min-width: 768px) {
.toc {
position: sticky;
top: var(--space-l);
grid-column: 1;
max-height: calc(100vh - var(--space-xl) - var(--space-2xl));
overflow-y: auto;
overscroll-behavior: contain;
scrollbar-width: thin;
}
.toc summary {