1
- const { asLength , nameClass, asValue } = require ( '../pluginUtils' )
1
+ const { asValue , nameClass } = require ( '../pluginUtils' )
2
2
3
3
module . exports = function ( { matchUtilities, jit : { theme } } ) {
4
4
matchUtilities ( {
5
5
m : ( modifier , { theme, candidate } ) => {
6
- let value = asLength ( modifier , theme [ 'margin' ] )
6
+ let value = asValue ( modifier , theme [ 'margin' ] )
7
7
8
8
if ( value === undefined ) {
9
9
return [ ]
@@ -14,7 +14,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
14
14
} )
15
15
matchUtilities ( {
16
16
mx : ( modifier , { theme, candidate } ) => {
17
- let value = asLength ( modifier , theme [ 'margin' ] )
17
+ let value = asValue ( modifier , theme [ 'margin' ] )
18
18
19
19
if ( value === undefined ) {
20
20
return [ ]
@@ -23,7 +23,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
23
23
return { [ nameClass ( 'mx' , modifier ) ] : { 'margin-left' : value , 'margin-right' : value } }
24
24
} ,
25
25
my : ( modifier , { theme, candidate } ) => {
26
- let value = asLength ( modifier , theme [ 'margin' ] )
26
+ let value = asValue ( modifier , theme [ 'margin' ] )
27
27
28
28
if ( value === undefined ) {
29
29
return [ ]
@@ -43,7 +43,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
43
43
return { [ nameClass ( 'mt' , modifier ) ] : { 'margin-top' : value } }
44
44
} ,
45
45
mr : ( modifier , { theme, candidate } ) => {
46
- let value = asLength ( modifier , theme [ 'margin' ] )
46
+ let value = asValue ( modifier , theme [ 'margin' ] )
47
47
48
48
if ( value === undefined ) {
49
49
return [ ]
@@ -52,7 +52,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
52
52
return { [ nameClass ( 'mr' , modifier ) ] : { 'margin-right' : value } }
53
53
} ,
54
54
mb : ( modifier , { theme, candidate } ) => {
55
- let value = asLength ( modifier , theme [ 'margin' ] )
55
+ let value = asValue ( modifier , theme [ 'margin' ] )
56
56
57
57
if ( value === undefined ) {
58
58
return [ ]
@@ -61,7 +61,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
61
61
return { [ nameClass ( 'mb' , modifier ) ] : { 'margin-bottom' : value } }
62
62
} ,
63
63
ml : ( modifier , { theme, candidate } ) => {
64
- let value = asLength ( modifier , theme [ 'margin' ] )
64
+ let value = asValue ( modifier , theme [ 'margin' ] )
65
65
66
66
if ( value === undefined ) {
67
67
return [ ]
0 commit comments