Disable overscroll in IE11 mode

This commit is contained in:
Adam Wathan 2020-07-28 12:13:34 -04:00
parent 77ccb5c957
commit bb8a221eeb
7 changed files with 441 additions and 40 deletions

View file

@ -46,7 +46,7 @@ import objectPosition from './plugins/objectPosition'
import opacity from './plugins/opacity'
import outline from './plugins/outline'
import overflow from './plugins/overflow'
import overscroll from './plugins/overscroll'
import overscrollBehavior from './plugins/overscrollBehavior'
import padding from './plugins/padding'
import placeholderColor from './plugins/placeholderColor'
import pointerEvents from './plugins/pointerEvents'
@ -156,7 +156,7 @@ export default function({ corePlugins: corePluginConfig }) {
opacity,
outline,
overflow,
overscroll,
overscrollBehavior,
padding,
placeholderColor,
placeholderOpacity,

View file

@ -1,5 +1,9 @@
export default function() {
return function({ addUtilities, variants }) {
return function({ addUtilities, variants, target }) {
if (target('overscrollBehavior') === 'ie11') {
return
}
addUtilities(
{
'.overscroll-auto': { 'overscroll-behavior': 'auto' },
@ -12,7 +16,7 @@ export default function() {
'.overscroll-x-contain': { 'overscroll-behavior-x': 'contain' },
'.overscroll-x-none': { 'overscroll-behavior-x': 'none' },
},
variants('overscroll')
variants('overscrollBehavior')
)
}
}