_scrollbar.scss
ASCII text
1
/* Scrollbars */
2
3
@use "../../../../theme";
4
@use "../../../../theme-color";
5
6
StScrollView {
7
&.vfade { -st-vfade-offset: 32px; }
8
&.hfade { -st-hfade-offset: 32px; }
9
}
10
11
StScrollBar {
12
padding: 0;
13
14
StScrollView & {
15
min-width: 16px;
16
min-height: 16px;
17
}
18
19
StBin#trough {
20
margin: 4px;
21
border-radius: (8px / 2);
22
background-color: theme-color.disabled-stroke(theme-color.$on-surface);
23
}
24
25
StButton#vhandle,
26
StButton#hhandle {
27
transition-duration: theme.$state-duration;
28
margin: 4px;
29
// would be nice to margin or at least to transparent
30
// border: 4px solid transparent;
31
border-radius: (8px / 2);
32
background-color: theme-color.scrollbar-thumb(theme-color.$on-surface);
33
34
&:hover {
35
background-color: theme-color.scrollbar-thumb(theme-color.$on-surface, "hover");
36
}
37
38
&:active {
39
background-color: theme-color.scrollbar-thumb(theme-color.$on-surface, "pressed");
40
}
41
}
42
}
43
44
@mixin color($color) {
45
StBin#trough {
46
background-color: theme-color.disabled-stroke($color);
47
}
48
49
StButton#vhandle,
50
StButton#hhandle {
51
background-color: theme-color.scrollbar-thumb($color);
52
53
&:hover {
54
background-color: theme-color.scrollbar-thumb($color, "hover");
55
}
56
57
&:active {
58
background-color: theme-color.scrollbar-thumb($color, "pressed");
59
}
60
}
61
}
62