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

Missing class group for items-X (X = left | center | right) #464

Closed
xeger opened this issue Aug 28, 2024 · 2 comments
Closed

Missing class group for items-X (X = left | center | right) #464

xeger opened this issue Aug 28, 2024 · 2 comments
Labels
context-v2 Related to tailwind-merge v2

Comments

@xeger
Copy link

xeger commented Aug 28, 2024

Describe the bug

The class group for align-items is specified in the Tailwind docs as items-left and so on.

I can extend the base to compensate, which I have done, but I wanted to raise this issue as a possible bug.

To Reproduce

twMerge('items-left items-center') // => 'items-left items-center'

Expected behavior

twMerge('items-left items-center') // => 'items-center'

Environment

  • tailwind-merge version: 2.5.2

Additional context

Looking in the default config, I see there is an align-items group, but this is either an alias that tailwind provides, or it's a downright bug in tailwind-merge. I do not see any mention of align-items in the Tailwind v3 docs.

@github-actions github-actions bot added the context-v2 Related to tailwind-merge v2 label Aug 28, 2024
@dcastil
Copy link
Owner

dcastil commented Aug 29, 2024

Hey @xeger! 👋

I think you meant items-start instead of items-left, right? The class items-left doesn't exist in Tailwind CSS and therefore gets ignored by tailwind-merge. You can find the tailwind-merge config for the align-items group here: https://github.com/dcastil/tailwind-merge/blob/v2.5.2/src/lib/default-config.ts#L441-L445

@xeger
Copy link
Author

xeger commented Aug 31, 2024

Right you are! 🫡 Thanks again for this excellent tool.

@xeger xeger closed this as completed Aug 31, 2024
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
Projects
None yet
Development

No branches or pull requests

2 participants