1- const { asLength , nameClass, asValue } = require ( '../pluginUtils' )
1+ const { asValue , nameClass } = require ( '../pluginUtils' )
22
33module . exports = function ( { matchUtilities, jit : { theme } } ) {
44 matchUtilities ( {
55 m : ( modifier , { theme, candidate } ) => {
6- let value = asLength ( modifier , theme [ 'margin' ] )
6+ let value = asValue ( modifier , theme [ 'margin' ] )
77
88 if ( value === undefined ) {
99 return [ ]
@@ -14,7 +14,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
1414 } )
1515 matchUtilities ( {
1616 mx : ( modifier , { theme, candidate } ) => {
17- let value = asLength ( modifier , theme [ 'margin' ] )
17+ let value = asValue ( modifier , theme [ 'margin' ] )
1818
1919 if ( value === undefined ) {
2020 return [ ]
@@ -23,7 +23,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
2323 return { [ nameClass ( 'mx' , modifier ) ] : { 'margin-left' : value , 'margin-right' : value } }
2424 } ,
2525 my : ( modifier , { theme, candidate } ) => {
26- let value = asLength ( modifier , theme [ 'margin' ] )
26+ let value = asValue ( modifier , theme [ 'margin' ] )
2727
2828 if ( value === undefined ) {
2929 return [ ]
@@ -43,7 +43,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
4343 return { [ nameClass ( 'mt' , modifier ) ] : { 'margin-top' : value } }
4444 } ,
4545 mr : ( modifier , { theme, candidate } ) => {
46- let value = asLength ( modifier , theme [ 'margin' ] )
46+ let value = asValue ( modifier , theme [ 'margin' ] )
4747
4848 if ( value === undefined ) {
4949 return [ ]
@@ -52,7 +52,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
5252 return { [ nameClass ( 'mr' , modifier ) ] : { 'margin-right' : value } }
5353 } ,
5454 mb : ( modifier , { theme, candidate } ) => {
55- let value = asLength ( modifier , theme [ 'margin' ] )
55+ let value = asValue ( modifier , theme [ 'margin' ] )
5656
5757 if ( value === undefined ) {
5858 return [ ]
@@ -61,7 +61,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
6161 return { [ nameClass ( 'mb' , modifier ) ] : { 'margin-bottom' : value } }
6262 } ,
6363 ml : ( modifier , { theme, candidate } ) => {
64- let value = asLength ( modifier , theme [ 'margin' ] )
64+ let value = asValue ( modifier , theme [ 'margin' ] )
6565
6666 if ( value === undefined ) {
6767 return [ ]
0 commit comments