Skip to content

Commit 444c59f

Browse files
committed
Add overscroll plugin
1 parent 4ee53f3 commit 444c59f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/corePlugins.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import objectPosition from './plugins/objectPosition'
4646
import opacity from './plugins/opacity'
4747
import outline from './plugins/outline'
4848
import overflow from './plugins/overflow'
49+
import overscroll from './plugins/overscroll'
4950
import padding from './plugins/padding'
5051
import placeholderColor from './plugins/placeholderColor'
5152
import pointerEvents from './plugins/pointerEvents'
@@ -154,6 +155,7 @@ export default function({ corePlugins: corePluginConfig }) {
154155
opacity,
155156
outline,
156157
overflow,
158+
overscroll,
157159
padding,
158160
placeholderColor,
159161
placeholderOpacity,

src/plugins/overscroll.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export default function() {
2+
return function({ addUtilities, variants }) {
3+
addUtilities(
4+
{
5+
'.overscroll-auto': { 'overscroll-behavior': 'auto' },
6+
'.overscroll-contain': { 'overscroll-behavior': 'contain' },
7+
'.overscroll-none': { 'overscroll-behavior': 'none' },
8+
'.overscroll-y-auto': { 'overscroll-behavior-y': 'auto' },
9+
'.overscroll-y-contain': { 'overscroll-behavior-y': 'contain' },
10+
'.overscroll-y-none': { 'overscroll-behavior-y': 'none' },
11+
'.overscroll-x-auto': { 'overscroll-behavior-x': 'auto' },
12+
'.overscroll-x-contain': { 'overscroll-behavior-x': 'contain' },
13+
'.overscroll-x-none': { 'overscroll-behavior-x': 'none' },
14+
},
15+
variants('overscroll')
16+
)
17+
}
18+
}

0 commit comments

Comments
 (0)