Consistent scrollbar styling across browsers

- colors.css: added --scrollbar-thumb, --scrollbar-thumb-hover, --scrollbar-track, --scrollbar-corner custom properties
- base.css: consolidated all scrollbar rules (WebKit ::-webkit-scrollbar* + Firefox scrollbar-width/color), added ::-webkit-scrollbar-corner, changed selector from * to html (scrollbar-width inherits), added scrollbar-gutter: stable
- admin.css: removed redundant scrollbar-width: thin on header nav
- toc.css: removed redundant scrollbar-width: thin on desktop .toc
This commit is contained in:
Pontoporeia
2026-07-10 12:00:36 +02:00
parent 08a9b7309f
commit a8dcc4bba5
5 changed files with 20 additions and 22 deletions
+1
View File
@@ -46,3 +46,4 @@
- [x] Wider heading scale (h1/h2/h3) for apropos/licence/charte pages: step-5 / step-3 / step-1 - [x] Wider heading scale (h1/h2/h3) for apropos/licence/charte pages: step-5 / step-3 / step-1
- [x] Masquer le bloc "Durée" sur la page TFE quand aucune durée n'est encodée (ni pages ni minutes) - [x] Masquer le bloc "Durée" sur la page TFE quand aucune durée n'est encodée (ni pages ni minutes)
- [x] Fix: locked_year cleared on edit — edit dialog didn't populate the field, so any edit cleared the locked academic year - [x] Fix: locked_year cleared on edit — edit dialog didn't populate the field, so any edit cleared the locked academic year
- [x] Consistent scrollbar styling across browsers (WebKit/Blink/Firefox): custom properties in colors.css, unified rules in base.css, removed redundant declarations
-1
View File
@@ -14,7 +14,6 @@
.admin-body header nav { .admin-body header nav {
overflow-x: auto; overflow-x: auto;
white-space: nowrap; white-space: nowrap;
scrollbar-width: thin;
} }
.admin-body header nav .nav-right-links { .admin-body header nav .nav-right-links {
flex-shrink: 0; flex-shrink: 0;
+12 -20
View File
@@ -11,30 +11,22 @@ body {
overflow: hidden; overflow: hidden;
} }
/* ── Discreet scrollbars ─────────────────────────────────────────── */ /* ── Discreet scrollbars (WebKit / Blink / Firefox) ──────────────── */
/* WebKit browsers */ /* CSS custom properties defined in colors.css:
--scrollbar-thumb, --scrollbar-thumb-hover, --scrollbar-track, --scrollbar-corner */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 5px; width: var(--scrollbar-width, 5px);
height: 5px; height: var(--scrollbar-width, 5px);
} }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
::-webkit-scrollbar-corner { background: var(--scrollbar-corner); }
::-webkit-scrollbar-track { html {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--text-tertiary);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}
/* Firefox */
* {
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: var(--text-tertiary) transparent; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
scrollbar-gutter: stable;
} }
body { body {
+7
View File
@@ -15,6 +15,13 @@
--text-secondary: #666666; --text-secondary: #666666;
--text-tertiary: #999999; --text-tertiary: #999999;
/* Scrollbar */
--scrollbar-width: 5px;
--scrollbar-thumb: var(--text-tertiary);
--scrollbar-thumb-hover: var(--text-secondary);
--scrollbar-track: transparent;
--scrollbar-corner: transparent;
/* Borders */ /* Borders */
--border-primary: #dddddd; --border-primary: #dddddd;
--border-secondary: #cccccc; --border-secondary: #cccccc;
-1
View File
@@ -119,7 +119,6 @@
max-height: calc(100vh - var(--space-xl) - var(--space-2xl)); max-height: calc(100vh - var(--space-xl) - var(--space-2xl));
overflow-y: auto; overflow-y: auto;
overscroll-behavior: contain; overscroll-behavior: contain;
scrollbar-width: thin;
} }
.toc summary { .toc summary {