-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy path[ui] Native Scrollbar styles.css
35 lines (35 loc) · 1.18 KB
/
[ui] Native Scrollbar styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
Native scrollbars
I styled the native scrollbars before I reaized there was an option to render them in Obsidian...
Only tested on MacOS
https://github.com/replete/obsidian-minimal-theme-css-snippets
*/
:root {
--scrollbar-size: 6px;
}
::-webkit-scrollbar {
width: var(--scrollbar-size); /* for vertical scrollbars */
height: var(--scrollbar-size); /* for horizontal scrollbars */
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
background:transparent;
}
::-webkit-scrollbar-track:vertical {
background:linear-gradient(to right, transparent 50%, hsla(var(--base-h), var(--base-s), calc(var(--base-l) - 10%), 0.2));
}
::-webkit-scrollbar-track:horizontal {
background:linear-gradient(to bottom, transparent 50%, hsla(var(--base-h), var(--base-s), calc(var(--base-l) - 10%), 0.2));
}
::-webkit-scrollbar-thumb {
background: var(--nav-indentation-guide-color);
}
/* ::-webkit-scrollbar-thumb:vertical {
border-radius: var(--scrollbar-size) 0 0 var(--scrollbar-size);
}
::-webkit-scrollbar-thumb:horizontal {
border-radius: var(--scrollbar-size) var(--scrollbar-size) 0 0;
} */
::-webkit-scrollbar-thumb:hover {
background: var(--text-muted);
}