Skip to content

Commit f625723

Browse files
committed
style: enhance scrollbar styling with live color and improved visibility
1 parent d202476 commit f625723

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

src/demo/style.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,32 @@
7272
color: var(--live-ink, var(--bg));
7373
}
7474

75+
/* scrollbar tinted with the live color (Firefox + standard) */
76+
html {
77+
scrollbar-color: var(--live) transparent;
78+
scrollbar-width: thin;
79+
}
80+
81+
/* WebKit scrollbar */
82+
::-webkit-scrollbar {
83+
width: 12px;
84+
height: 12px;
85+
}
86+
87+
::-webkit-scrollbar-track {
88+
background: transparent;
89+
}
90+
91+
::-webkit-scrollbar-thumb {
92+
background: var(--live);
93+
border: 3px solid var(--bg); /* inset padding so the thumb reads as a slim bar */
94+
border-radius: 0;
95+
}
96+
97+
::-webkit-scrollbar-thumb:hover {
98+
background: var(--ink);
99+
}
100+
75101
html,
76102
body {
77103
margin: 0;

0 commit comments

Comments
 (0)