-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bug: Cannot override preset if using Tailwind important: true #5081
Comments
Thanks a lot for your report! I'll work on it in the 3.48 milestone. |
Hi @martinszeltins, The good news is that the mergeProps option has been improved in this version. You can do this kind of operation by writing your custom merge method. Please see; Best Regards, |
@mertsincan awesome! It feels like the |
Thanks for the feedback, but we don't want to be dependent on such 3rd party APIs. That's why we wanted users to write a global merge method and use the API or custom implementation they want. I think this is a more flexible approach. Also, this situation should not be evaluated only in terms of 'class'. For example, you have a custom event or HTML attribute that is both global and local. You can apply the special combination method accordingly, whichever you want to prioritize. |
That makes sense. I'm just thinking that |
Describe the bug
As @mertsincan said in this PrimeVue Tailwind issue, I am opening an issue here.
It is not currently possible to override a preset locally if project is using
important: true
in tailwind.config. It seems it would be better to use the tailwind-merge library. I am referring to this: https://tailwind.primevue.org/guides/overriding-presets/#importantIn some projects it is necessary to use
important: true
configuration.For example, here the
!bg-blue-500
class won't work because all my Tailwind classes in my project are important because ofimportant: true
in my tailwind config.As was suggested by @mertsincan we could add a method to use custom merging libraries.
Reproducer
https://stackblitz.com/edit/github-b8ul9o?file=src%2FApp.vue
PrimeVue version
3.46.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: