You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't see this being discussed but the cn util uses the default twMerge function, which doesn't work with any custom tailwind theme variables. I think a merge config should be included for the semantic theme vars to avoid twMerge from removing them when a default util with a common namespace is used (i.e. bg-neutral would override bg-primary).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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 didn't see this being discussed but the
cn
util uses the defaulttwMerge
function, which doesn't work with any custom tailwind theme variables. I think a merge config should be included for the semantic theme vars to avoid twMerge from removing them when a default util with a common namespace is used (i.e. bg-neutral would override bg-primary).Here's an example:
Would still need to add a condition to use the default
twMerge
function ifcssVariables
is set tofalse
.More info about extending tailwind-merge:
Beta Was this translation helpful? Give feedback.
All reactions