forked from hyoo-ru/mam_mol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scroll.view.css.ts
58 lines (47 loc) · 941 Bytes
/
scroll.view.css.ts
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
namespace $.$$ {
const { per , rem , px } = $mol_style_unit
$mol_style_define( $mol_scroll , {
display: 'flex',
overflow: 'auto',
flex: {
direction: 'column',
grow: 1,
shrink: 1,
},
outline: 'none',
alignSelf: 'stretch',
boxSizing: 'border-box',
willChange: 'scroll-position',
transform: 'translateZ(0)', // enforce gpu scroll in all agents
maxHeight: per(100),
maxWidth: per(100),
webkitOverflowScrolling: 'touch',
scrollbar: {
color: [ $mol_theme.line , 'transparent' ],
},
'::-webkit-scrollbar': {
width: rem(.5),
height: rem(.5),
},
'::-webkit-scrollbar-corner': {
background: {
color: $mol_theme.line,
},
},
'::-webkit-scrollbar-track': {
background: {
color: 'transparent',
},
},
'::-webkit-scrollbar-thumb': {
background: {
color: $mol_theme.line,
},
},
'@media' : {
'print' : {
overflow: 'visible',
},
},
})
}