Skip to content

Conversation

@RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Nov 17, 2021

This PR will allow you to combine touch-action utilities. This is a fairly simple implementation to make it work.

This will allow you to combine multiple touch-action utilities:

<div class="touch-pan-x touch-pan-up">
  <!-- ... -->
</div>

Would eventually resolve to:

touch-action: pan-x pan-up;

You can also combine every touch-action utility with the touch-pinch-zoom utility. If you really want to, then you can also use touch-pan-x touch-pan-y touch-pinch-zoom which can be simplified as touch-manipulation. This is also what the browser will resolve to if you use the 3 utilities from above together.

You can't combine touch-pan-left touch-pan-right because touch-pan-x is shorter according to the MDN docs. If you try and do this, then the browser will use touch-action: auto instead. Not a lot we can do about it here, so this is considered user error.

@RobinMalfait RobinMalfait force-pushed the combinable-touch-actions branch from 20d7331 to f4d8987 Compare November 17, 2021 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants