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
When having a logical property like ps-2 and we add to it pl-4 they don't resolve and the two values are printed
as mentioned down in the pull request of shadcn-vue
twMerge('pl-4', 'ps-6') ---> pl-4 ps-6 (directional + logical) the expected result should be ps-6 only as it come later twMerge('pl-4', 'pl-6') ---> pl-6 (directional + directional) twMerge('ps-4', 'ps-6') ---> ps-6 (logical+ logical)
The text was updated successfully, but these errors were encountered:
tailwind-merge doesn't resolve conflicts between normal and logical properties because it doesn't have access to the axis along which logical properties are being applied. This axis is dynamic and can be different for any node in the DOM.
E.g. ps-6 (applying the padding-inline-start property) would be in conflict with pl-4 without any other properties being set. But if a parent node applies the CSS direction: rtl, ps-6 wouldn't be in conflict with pl-4 anymore because ps-6 then gets applied to the right side instead. And if additionally writing-mode: vertical-lr is applied (to a parent), ps-6 gets applied to the bottom of the node.
Describe the bug
When having a logical property like
ps-2
and we add to itpl-4
they don't resolve and the two values are printedas mentioned down in the pull request of shadcn-vue
To Reproduce
unovue/shadcn-vue#379 (comment)
Expected behavior
twMerge('pl-4', 'ps-6')
--->pl-4 ps-6
(directional + logical) the expected result should beps-6
only as it come latertwMerge('pl-4', 'pl-6')
--->pl-6
(directional + directional)twMerge('ps-4', 'ps-6')
--->ps-6
(logical+ logical)The text was updated successfully, but these errors were encountered: