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

Extend tailwind-merge configuration #2893

Closed
stijns96 opened this issue Dec 13, 2024 · 6 comments
Closed

Extend tailwind-merge configuration #2893

stijns96 opened this issue Dec 13, 2024 · 6 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@stijns96
Copy link

stijns96 commented Dec 13, 2024

For what version of Nuxt UI are you suggesting this?

v2.x

Description

I know you guys are working hard on V3, but I really like to see this feature still in V2. We all know that not everybody will move over to V3 right away.

I have to set my strategy to override, because tailwind-merge doesn't know about my custom tailwind extends. This is quite a pain in the ass, since this is causing other issues as well. Take the Pro LandingGird as example. Classes are added to the grid items to set the right cols. By doing this with strategy set to override, all other classes will be overridden.

I saw some sort of solution in #925 , but that didn't work. It's also not documented and can't find it in the module either.

I know have to create my own merge config, but that will not work for Nuxt UI.

Additional context

You may wonder why I need this. Thats because I'm also using Tailwind Fluid, and try to replicate a design library that uses different spacings etc.

Image

@stijns96 stijns96 added enhancement New feature or request triage labels Dec 13, 2024
Copy link
Member

I don't think it's possible at the moment. However, I did this PR back in the days that I ended up not merging that might solve this: #1108

@stijns96
Copy link
Author

Hi @benjamincanac ,

Thanks for looking at it. It did see that PR as well.

What are the next steps? I'm a bit confused as you mention it is not possible while that PR might fix the issue?

Copy link
Member

This could be reopened but a lot has changed meanwhile and the refactor might need to be done on other components as well. I don't have time for this at the moment so feel free to open a PR 😊

Copy link
Member

Duplicate #1939.

@benjamincanac benjamincanac added duplicate This issue or pull request already exists and removed triage labels Dec 13, 2024 — with Volta.net
@benjamincanac benjamincanac closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2024
@stijns96
Copy link
Author

stijns96 commented Dec 13, 2024

Hi @benjamincanac,

I'll see what I can do. Just as a reference, the PR seems quite accurate already, right?

Simply change the imports and make sure the twMerge key from the app.config will be merged in there as well.

If you could confirm it will give me a better start 😊

p.s. from what branch should I create a new branch? From main and then PR to dev?

Copy link
Member

I've restored the fix/925 branch, you can checkout it and merge from dev to resolve the conflicts. Then open a PR from this branch that targets dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants