@@ -602,18 +602,65 @@ export let corePlugins = {
602602
603603 cursor : createUtilityPlugin ( 'cursor' ) ,
604604
605- touchAction : ( { addUtilities } ) => {
605+ touchAction : ( { addBase, addUtilities } ) => {
606+ addBase ( {
607+ '@defaults touch-action' : {
608+ '--tw-pan-x' : 'var(--tw-empty,/*!*/ /*!*/)' ,
609+ '--tw-pan-left' : 'var(--tw-empty,/*!*/ /*!*/)' ,
610+ '--tw-pan-right' : 'var(--tw-empty,/*!*/ /*!*/)' ,
611+ '--tw-pan-y' : 'var(--tw-empty,/*!*/ /*!*/)' ,
612+ '--tw-pan-up' : 'var(--tw-empty,/*!*/ /*!*/)' ,
613+ '--tw-pan-down' : 'var(--tw-empty,/*!*/ /*!*/)' ,
614+ '--tw-pinch-zoom' : 'var(--tw-empty,/*!*/ /*!*/)' ,
615+ '--tw-manipulation' : 'var(--tw-empty,/*!*/ /*!*/)' ,
616+ '--tw-touch-action' :
617+ 'var(--tw-pan-x) var(--tw-pan-left) var(--tw-pan-right) var(--tw-pan-y) var(--tw-pan-up) var(--tw-pan-down) var(--tw-pinch-zoom) var(--tw-manipulation)' ,
618+ } ,
619+ } )
620+
606621 addUtilities ( {
607622 '.touch-auto' : { 'touch-action' : 'auto' } ,
608623 '.touch-none' : { 'touch-action' : 'none' } ,
609- '.touch-pan-x' : { 'touch-action' : 'pan-x' } ,
610- '.touch-pan-left' : { 'touch-action' : 'pan-left' } ,
611- '.touch-pan-right' : { 'touch-action' : 'pan-right' } ,
612- '.touch-pan-y' : { 'touch-action' : 'pan-y' } ,
613- '.touch-pan-up' : { 'touch-action' : 'pan-up' } ,
614- '.touch-pan-down' : { 'touch-action' : 'pan-down' } ,
615- '.touch-pinch-zoom' : { 'touch-action' : 'pinch-zoom' } ,
616- '.touch-manipulation' : { 'touch-action' : 'manipulation' } ,
624+ '.touch-pan-x' : {
625+ '@defaults touch-action' : { } ,
626+ '--tw-pan-x' : 'pan-x' ,
627+ 'touch-action' : 'var(--tw-touch-action)' ,
628+ } ,
629+ '.touch-pan-left' : {
630+ '@defaults touch-action' : { } ,
631+ '--tw-pan-left' : 'pan-left' ,
632+ 'touch-action' : 'var(--tw-touch-action)' ,
633+ } ,
634+ '.touch-pan-right' : {
635+ '@defaults touch-action' : { } ,
636+ '--tw-pan-right' : 'pan-right' ,
637+ 'touch-action' : 'var(--tw-touch-action)' ,
638+ } ,
639+ '.touch-pan-y' : {
640+ '@defaults touch-action' : { } ,
641+ '--tw-pan-y' : 'pan-y' ,
642+ 'touch-action' : 'var(--tw-touch-action)' ,
643+ } ,
644+ '.touch-pan-up' : {
645+ '@defaults touch-action' : { } ,
646+ '--tw-pan-up' : 'pan-up' ,
647+ 'touch-action' : 'var(--tw-touch-action)' ,
648+ } ,
649+ '.touch-pan-down' : {
650+ '@defaults touch-action' : { } ,
651+ '--tw-pan-down' : 'pan-down' ,
652+ 'touch-action' : 'var(--tw-touch-action)' ,
653+ } ,
654+ '.touch-pinch-zoom' : {
655+ '@defaults touch-action' : { } ,
656+ '--tw-pinch-zoom' : 'pinch-zoom' ,
657+ 'touch-action' : 'var(--tw-touch-action)' ,
658+ } ,
659+ '.touch-manipulation' : {
660+ '@defaults touch-action' : { } ,
661+ '--tw-manipulation' : 'manipulation' ,
662+ 'touch-action' : 'var(--tw-touch-action)' ,
663+ } ,
617664 } )
618665 } ,
619666
0 commit comments