1
- const { asLength , nameClass } = require ( '../pluginUtils' )
1
+ const { asValue , nameClass } = require ( '../pluginUtils' )
2
2
3
- module . exports = function ( { matchUtilities, jit : { theme } } ) {
3
+ module . exports = function ( { matchUtilities } ) {
4
4
matchUtilities ( {
5
5
inset : ( modifier , { theme } ) => {
6
- let value = asLength ( modifier , theme [ 'inset' ] )
6
+ let value = asValue ( modifier , theme [ 'inset' ] )
7
7
8
8
if ( value === undefined ) {
9
9
return [ ]
@@ -16,7 +16,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
16
16
} )
17
17
matchUtilities ( {
18
18
'inset-x' : ( modifier , { theme } ) => {
19
- let value = asLength ( modifier , theme [ 'inset' ] )
19
+ let value = asValue ( modifier , theme [ 'inset' ] )
20
20
21
21
if ( value === undefined ) {
22
22
return [ ]
@@ -25,7 +25,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
25
25
return { [ nameClass ( 'inset-x' , modifier ) ] : { left : value , right : value } }
26
26
} ,
27
27
'inset-y' : ( modifier , { theme } ) => {
28
- let value = asLength ( modifier , theme [ 'inset' ] )
28
+ let value = asValue ( modifier , theme [ 'inset' ] )
29
29
30
30
if ( value === undefined ) {
31
31
return [ ]
@@ -36,7 +36,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
36
36
} )
37
37
matchUtilities ( {
38
38
top : ( modifier , { theme } ) => {
39
- let value = asLength ( modifier , theme [ 'inset' ] )
39
+ let value = asValue ( modifier , theme [ 'inset' ] )
40
40
41
41
if ( value === undefined ) {
42
42
return [ ]
@@ -45,7 +45,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
45
45
return { [ nameClass ( 'top' , modifier ) ] : { top : value } }
46
46
} ,
47
47
right : ( modifier , { theme } ) => {
48
- let value = asLength ( modifier , theme [ 'inset' ] )
48
+ let value = asValue ( modifier , theme [ 'inset' ] )
49
49
50
50
if ( value === undefined ) {
51
51
return [ ]
@@ -54,7 +54,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
54
54
return { [ nameClass ( 'right' , modifier ) ] : { right : value } }
55
55
} ,
56
56
bottom : ( modifier , { theme } ) => {
57
- let value = asLength ( modifier , theme [ 'inset' ] )
57
+ let value = asValue ( modifier , theme [ 'inset' ] )
58
58
59
59
if ( value === undefined ) {
60
60
return [ ]
@@ -63,7 +63,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
63
63
return { [ nameClass ( 'bottom' , modifier ) ] : { bottom : value } }
64
64
} ,
65
65
left : ( modifier , { theme } ) => {
66
- let value = asLength ( modifier , theme [ 'inset' ] )
66
+ let value = asValue ( modifier , theme [ 'inset' ] )
67
67
68
68
if ( value === undefined ) {
69
69
return [ ]
0 commit comments