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

touch classes incorrectly override eachother #312

Closed
jamesbirtles opened this issue Sep 12, 2023 · 2 comments · Fixed by #313
Closed

touch classes incorrectly override eachother #312

jamesbirtles opened this issue Sep 12, 2023 · 2 comments · Fixed by #313
Labels
bug Something isn't working context-v2 Related to tailwind-merge v2
Milestone

Comments

@jamesbirtles
Copy link

Describe the bug

When trying to use, for example, touch-pan-y touch-pinch-zoom, twMerge will remove the touch-pan-y.

To Reproduce

twMerge("touch-pan-y touch-pinch-zoom")

Expected behavior

Looking at the css, some of the touch- classes can be applied together
CleanShot 2023-09-12 at 16 49 14@2x
CleanShot 2023-09-12 at 16 49 55@2x

So the touch-pan-y should be kept alongside the touch-pinch-zoom

Environment

  • tailwind-merge version: 1.14.0
@dcastil dcastil added the bug Something isn't working label Sep 17, 2023
@dcastil dcastil added this to the v2 milestone Sep 17, 2023
@dcastil
Copy link
Owner

dcastil commented Sep 17, 2023

Hey @jamesbirtles! 👋

Thanks for reporting!

You're right. Just took a look in the Tailwind source code and found this: https://github.com/tailwindlabs/tailwindcss/blob/42e75ba4b860ef75656cff3119aa56e70714d34c/src/corePlugins.js#L969-L1018

The x, y and pinch-zoom classes need to go into separate groups so they can be used together.

I'm currently working on a v2 release and will include this fix in there. This means you'll need a major version upgrade to get this. I hope this is fine.

PS: Thanks for your patience, I'm just coming back from a vacation.

@github-actions
Copy link

This was addressed in release v2.0.0.

@dcastil dcastil added the context-v2 Related to tailwind-merge v2 label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working context-v2 Related to tailwind-merge v2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants