mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 07:11:18 +02:00
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:
@@ -14,7 +14,6 @@
|
||||
.admin-body header nav {
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
.admin-body header nav .nav-right-links {
|
||||
flex-shrink: 0;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
--text-secondary: #666666;
|
||||
--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 */
|
||||
--border-primary: #dddddd;
|
||||
--border-secondary: #cccccc;
|
||||
|
||||
@@ -119,7 +119,6 @@
|
||||
max-height: calc(100vh - var(--space-xl) - var(--space-2xl));
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.toc summary {
|
||||
|
||||
Reference in New Issue
Block a user