Replies: 5 comments 5 replies
-
I'd love to hear the official stance on this. Even a general or vague answer would help give some insight into how both Tailwind and tailwind-merge might evolve. |
Beta Was this translation helpful? Give feedback.
-
Having a native helper function for class merging would be huge |
Beta Was this translation helpful? Give feedback.
-
Now that there's a Vite plugin, I believe they could automatically insert a merge function in all places where classes are specified, e.g.:
And, with awareness of what classes exactly are used in the codebase, this EDIT: basically the same idea as described here: dcastil/tailwind-merge#413 (comment) |
Beta Was this translation helpful? Give feedback.
-
I think a lot of the problems tailwind merge solves can also be solved by having styling split between the component and utility layers. However its very common to use tailwind for at least property modifiers, but also for base component styling by tools like shadcn. I wonder if tailwind could just have a configurable prefix to use a class on the component layer. So You could also have this plug into a variant, but the idea only works if you duplicate the classes for the differing specificity. |
Beta Was this translation helpful? Give feedback.
-
Qwik UI maintainer here 👋 I am exploring an idea that might seem controversial but I find it more and more appealing. Tailwind 4 uses native css @layer by default, so we can leverage this css feature to enable class names overrides on our components. There are quite a few performance and DX benefits to this approach, the only downside is that we need to define a separate css file containing the overridable classes in the @layer. I wrote an RFC detailing how it works and what the benefits are: qwikifiers/qwik-ui#1111. Edit: here's the simplified concept if you don't have time to go through the RFC: https://play.tailwindcss.com/sORZZZiz1I |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am really looking forward to Tailwind v4. I plan to start experimenting with it soon.
I'm here today to ask if there's anything that can be done to facilitate the transition to third-party modules like tailwind-merge (dcastil/tailwind-merge#468).
This library is super useful for component libraries and overrides.
To give you more context:
Thank you for your time and your work!
Beta Was this translation helpful? Give feedback.
All reactions