Skip to content

RFC: 3.2.6 should be a major release as it includes breaking changes regarding overriding class names #10603

@jdpt0

Description

@jdpt0

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions