From 5aba62df483eb5cfd34bb7518f65dec028744a0e Mon Sep 17 00:00:00 2001 From: Dany Castillo <31006608+dcastil@users.noreply.github.com> Date: Sat, 18 Nov 2023 13:54:14 +0100 Subject: [PATCH 1/2] add line-clamp conflict with display and overflow classes to default config --- src/lib/default-config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/default-config.ts b/src/lib/default-config.ts index 451242c8..a29892df 100644 --- a/src/lib/default-config.ts +++ b/src/lib/default-config.ts @@ -1740,6 +1740,7 @@ export function getDefaultConfig() { 'fvn-figure': ['fvn-normal'], 'fvn-spacing': ['fvn-normal'], 'fvn-fraction': ['fvn-normal'], + 'line-clamp': ['display', 'overflow'], rounded: [ 'rounded-s', 'rounded-e', From c11411b0be7af059c7fcff05ac70ed4193f16192 Mon Sep 17 00:00:00 2001 From: Dany Castillo <31006608+dcastil@users.noreply.github.com> Date: Sat, 18 Nov 2023 13:54:34 +0100 Subject: [PATCH 2/2] add test case for conflcit between line-clamp and display, overflow classes --- tests/conflicts-across-class-groups.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/conflicts-across-class-groups.test.ts b/tests/conflicts-across-class-groups.test.ts index 5f1c2ef9..af91a7a6 100644 --- a/tests/conflicts-across-class-groups.test.ts +++ b/tests/conflicts-across-class-groups.test.ts @@ -31,3 +31,8 @@ test('touch classes do create conflicts correctly', () => { ) expect(twMerge('touch-pan-x touch-pan-y touch-pinch-zoom touch-auto')).toBe('touch-auto') }) + +test('line-clamp classes do create conflicts correctly', () => { + expect(twMerge('overflow-auto inline line-clamp-1')).toBe('line-clamp-1') + expect(twMerge('line-clamp-1 overflow-auto inline')).toBe('line-clamp-1 overflow-auto inline') +})