Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add combinable touch-action support #6115

merged 2 commits into from Nov 17, 2021


Copy link

@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">
  <!-- ... -->

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 merged commit 03f9de9 into master Nov 17, 2021
@RobinMalfait RobinMalfait deleted the combinable-touch-actions branch November 17, 2021 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant