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 support for Tailwind 3.4's size-* #359

Closed
ahkhanjani opened this issue Dec 20, 2023 · 5 comments · Fixed by #360
Closed

Add support for Tailwind 3.4's size-* #359

ahkhanjani opened this issue Dec 20, 2023 · 5 comments · Fixed by #360
Labels
context-v2 Related to tailwind-merge v2 feature request

Comments

@ahkhanjani
Copy link

size-* should override both h-* and w-* classes.

@dcastil dcastil added the context-v2 Related to tailwind-merge v2 label Dec 20, 2023
@dcastil
Copy link
Owner

dcastil commented Dec 20, 2023

I'll add support for all Tailwind CSS v3.4 features in the coming days.

Copy link

This was addressed in release v2.2.0.

@imekachi
Copy link

imekachi commented Jan 3, 2024

@dcastil Could you take a look at this test case?

expect(twMerge('w-5 size-10 w-12 h-3')).toBe('w-12 h-3')
image

Since w and h override every property that size provides, should size be removed?
For some reason, it's not.

@dcastil
Copy link
Owner

dcastil commented Jan 3, 2024

Hey @imekachi! 👋

This is intentional and shouldn't cause any issues: w-12 and h-3 would get applied in CSS although the size-10 class is present. I wrote an explanation to a similar question in #156 (comment) which also applies here.

@imekachi
Copy link

imekachi commented Jan 3, 2024

Hey @imekachi! 👋

This is intentional and shouldn't cause any issues: w-12 and h-3 would get applied in CSS although the size-10 class is present. I wrote an explanation to a similar question in #156 (comment) which also applies here.

I see. It makes sense now. Thanks for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context-v2 Related to tailwind-merge v2 feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants