From 1b0a7eb3ce8c8893298523a44f6e4b900f2b892e Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Sat, 26 Sep 2026 11:20:54 -0400 Subject: [PATCH] feat(sidebar): accordeon unique strict, Plus/Moins, scroll au survol --- index.css | 23 ++ src/components/sidebar/sidebar.component.html | 303 ++++++++++-------- src/components/sidebar/sidebar.component.ts | 77 ++++- src/services/i18n.service.ts | 6 + 4 files changed, 272 insertions(+), 137 deletions(-) diff --git a/index.css b/index.css index 8d1b543..e8c7259 100644 --- a/index.css +++ b/index.css @@ -209,3 +209,26 @@ body { /* Hide scrollbars on horizontal lists where we still want scrolling */ .no-scrollbar::-webkit-scrollbar { display: none; } .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; } + +/* --- Sidebar: scrollbar visible au survol / focus uniquement --------------- */ +.sidebar-scroll { + overflow-y: hidden; + scrollbar-width: thin; + scrollbar-color: #334155 transparent; + scrollbar-gutter: stable; +} +.sidebar-scroll:hover, +.sidebar-scroll:focus, +.sidebar-scroll:focus-within { + overflow-y: auto; +} +.sidebar-scroll::-webkit-scrollbar { width: 6px; } +.sidebar-scroll::-webkit-scrollbar-track { background: transparent; } +.sidebar-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 9999px; } +@media (hover: none) { + /* tactile / mobile : toujours scrollable */ + .sidebar-scroll { overflow-y: auto; } +} +@media (prefers-reduced-motion: reduce) { + .sidebar-scroll { scroll-behavior: auto; } +} diff --git a/src/components/sidebar/sidebar.component.html b/src/components/sidebar/sidebar.component.html index 5f98d90..8f360a3 100644 --- a/src/components/sidebar/sidebar.component.html +++ b/src/components/sidebar/sidebar.component.html @@ -1,4 +1,4 @@ -