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
+12 -20
View File
@@ -11,30 +11,22 @@ body {
overflow: hidden;
}
/* ── Discreet scrollbars ─────────────────────────────────────────── */
/* WebKit browsers */
/* ── Discreet scrollbars (WebKit / Blink / Firefox) ──────────────── */
/* CSS custom properties defined in colors.css:
--scrollbar-thumb, --scrollbar-thumb-hover, --scrollbar-track, --scrollbar-corner */
::-webkit-scrollbar {
width: 5px;
height: 5px;
width: var(--scrollbar-width, 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 {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--text-tertiary);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}
/* Firefox */
* {
html {
scrollbar-width: thin;
scrollbar-color: var(--text-tertiary) transparent;
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
scrollbar-gutter: stable;
}
body {