Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit 0033b6f

Browse files
committed
Migrate backgroundPosition
1 parent 157e0be commit 0033b6f

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/corePlugins/backgroundPosition.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
const nameClass = require('tailwindcss/lib/util/nameClass').default
22
const transformThemeValue = require('tailwindcss/lib/util/transformThemeValue').default
33

4-
module.exports = function ({ jit: { theme, addUtilities, addVariant, e } }) {
5-
addUtilities({
6-
bg: [
7-
(modifier, { theme }) => {
8-
let value = theme.backgroundPosition[modifier]
4+
module.exports = function ({ matchUtilities, jit: { theme } }) {
5+
matchUtilities({
6+
bg: (modifier, { theme }) => {
7+
let value = theme.backgroundPosition[modifier]
98

10-
if (value === undefined) {
11-
return []
12-
}
9+
if (value === undefined) {
10+
return []
11+
}
1312

14-
return [[nameClass('bg', modifier), { 'background-position': value }]]
15-
},
16-
],
13+
return { [nameClass('bg', modifier)]: { 'background-position': value } }
14+
},
1715
})
1816
}

0 commit comments

Comments
 (0)