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

merge rounded error! #469

Open
hymhub opened this issue Sep 14, 2024 · 2 comments
Open

merge rounded error! #469

hymhub opened this issue Sep 14, 2024 · 2 comments
Labels
context-v2 Related to tailwind-merge v2

Comments

@hymhub
Copy link

hymhub commented Sep 14, 2024

tailwind config:

// tailwind.config.ts
export default {
// ...
  theme: {
    extend: {
      borderRadius: {
        layout: '16px'
      }
    }
  }
}

error:

twMerge('rounded-layout', 'rounded-none')  // output -> rounded-layout rounded-none
twMerge('!rounded-layout', '!rounded-none')  // output -> !rounded-layout !rounded-none
@github-actions github-actions bot added the context-v2 Related to tailwind-merge v2 label Sep 14, 2024
@dcastil
Copy link
Owner

dcastil commented Sep 21, 2024

Hey @hymhub! 👋

Thanks for your patience, just came back from a vacation. tailwind-merge doesn't have access to the tailwind.config.ts file and you need to configure it separately so it knows about the rounded-layout class.

Here is an example on how to configure tailwind-merge: https://github.com/dcastil/tailwind-merge/blob/v2.5.2/docs/recipes.md#adding-custom-scale-from-tailwind-config-to-tailwind-merge-config.

And here is the documentation on how the tailwind-merge configuration works: https://github.com/dcastil/tailwind-merge/blob/v2.5.2/docs/configuration.md#usage-with-custom-tailwind-config.


(For myself)

Related: #447, #368, #322, #321, #315, #302, #276, #275, #274, #250, #207

@sylvainmouquet
Copy link

@hymhub if tailwind-merge don't fix the error, you can try twindmerge it's an alternative to tailwind-merge. I have added your test, it works well

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

3 participants