-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
#10552 and #10543 are examples of this.
This comes down to the fact that although to some it's considered a bug, many people (myself included) use it as a feature and override the tailwind CSS classes, expecting the CSS class to be overwritten with the latest value specified. Since this functionality has been changed (there has been no indication of the change other than these issues) between these versions many of our components are now rendering in a completely different layout between the two versions.
For example, I may have a Card component with a default of p-4 but I may want to override that to p-2 in some circumstances. On version 3.2.4 I was able to just use something like classnames (https://www.npmjs.com/package/classnames) to merge the strings together on the base component and the later value would take precedence. In order to do that now on 3.2.6, I have to use something like tw-merge (https://www.npmjs.com/package/tailwind-merge) to make this happen, which removes the previously defined tailwind values.
While it seems on the surface like this is just a fix to a minor bug, it can have a big impact on web apps that have many abstracted components with overriding tailwind classes, which is why I believe this change should result in a major release rather than a patch.