forked from tailwindlabs/tailwindcss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverscrollBehavior.js
More file actions
22 lines (21 loc) · 848 Bytes
/
overscrollBehavior.js
File metadata and controls
22 lines (21 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export default function() {
return function({ addUtilities, variants, target }) {
if (target('overscrollBehavior') === 'ie11') {
return
}
addUtilities(
{
'.overscroll-auto': { 'overscroll-behavior': 'auto' },
'.overscroll-contain': { 'overscroll-behavior': 'contain' },
'.overscroll-none': { 'overscroll-behavior': 'none' },
'.overscroll-y-auto': { 'overscroll-behavior-y': 'auto' },
'.overscroll-y-contain': { 'overscroll-behavior-y': 'contain' },
'.overscroll-y-none': { 'overscroll-behavior-y': 'none' },
'.overscroll-x-auto': { 'overscroll-behavior-x': 'auto' },
'.overscroll-x-contain': { 'overscroll-behavior-x': 'contain' },
'.overscroll-x-none': { 'overscroll-behavior-x': 'none' },
},
variants('overscrollBehavior')
)
}
}