@@ -602,17 +602,54 @@ export let corePlugins = {
602
602
603
603
cursor : createUtilityPlugin ( 'cursor' ) ,
604
604
605
- touchAction : ( { addUtilities } ) => {
605
+ touchAction : ( { addBase, addUtilities } ) => {
606
+ addBase ( {
607
+ '@defaults touch-action' : {
608
+ '--tw-pan-x' : 'var(--tw-empty,/*!*/ /*!*/)' ,
609
+ '--tw-pan-y' : 'var(--tw-empty,/*!*/ /*!*/)' ,
610
+ '--tw-pinch-zoom' : 'var(--tw-empty,/*!*/ /*!*/)' ,
611
+ '--tw-touch-action' : 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)' ,
612
+ } ,
613
+ } )
614
+
606
615
addUtilities ( {
607
616
'.touch-auto' : { 'touch-action' : 'auto' } ,
608
617
'.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' } ,
618
+ '.touch-pan-x' : {
619
+ '@defaults touch-action' : { } ,
620
+ '--tw-pan-x' : 'pan-x' ,
621
+ 'touch-action' : 'var(--tw-touch-action)' ,
622
+ } ,
623
+ '.touch-pan-left' : {
624
+ '@defaults touch-action' : { } ,
625
+ '--tw-pan-x' : 'pan-left' ,
626
+ 'touch-action' : 'var(--tw-touch-action)' ,
627
+ } ,
628
+ '.touch-pan-right' : {
629
+ '@defaults touch-action' : { } ,
630
+ '--tw-pan-x' : 'pan-right' ,
631
+ 'touch-action' : 'var(--tw-touch-action)' ,
632
+ } ,
633
+ '.touch-pan-y' : {
634
+ '@defaults touch-action' : { } ,
635
+ '--tw-pan-y' : 'pan-y' ,
636
+ 'touch-action' : 'var(--tw-touch-action)' ,
637
+ } ,
638
+ '.touch-pan-up' : {
639
+ '@defaults touch-action' : { } ,
640
+ '--tw-pan-y' : 'pan-up' ,
641
+ 'touch-action' : 'var(--tw-touch-action)' ,
642
+ } ,
643
+ '.touch-pan-down' : {
644
+ '@defaults touch-action' : { } ,
645
+ '--tw-pan-y' : 'pan-down' ,
646
+ 'touch-action' : 'var(--tw-touch-action)' ,
647
+ } ,
648
+ '.touch-pinch-zoom' : {
649
+ '@defaults touch-action' : { } ,
650
+ '--tw-pinch-zoom' : 'pinch-zoom' ,
651
+ 'touch-action' : 'var(--tw-touch-action)' ,
652
+ } ,
616
653
'.touch-manipulation' : { 'touch-action' : 'manipulation' } ,
617
654
} )
618
655
} ,
0 commit comments