Replies: 1 comment 5 replies
-
@otacleT Actually you can use extendTailwindMerge for override the rule of twMerge . Specify as follows :
then use Reproduce here https://stackblitz.com/edit/vitejs-vite-cwjwfamp?file=tailwind.config.cjs,src%2Fapp.tsx,src%2Futils.ts,src%2Findex.css |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to strictly match styles with our design specifications, so I've configured
tailwind.config.js
to support font sizes like 15px and 17px as follows:However, when using
twMerge
with text color, only the1.5base
class gets excluded:I found a similar discussion here:
#489
Looking at the code, this behavior seems to be related to the following section in
src/lib/default-config.ts
:Would it be possible to update the 'base' part to accept patterns matching
/^(\d+(\.\d+)?)?(base)$/
? This would allow for classes like1.5base
to work correctly withtwMerge
.Beta Was this translation helpful? Give feedback.
All reactions