Skip to content

Commit 552d019

Browse files
authored
Merge pull request #347 from dcastil/bugfix/345/fix-display-not-removed-when-it-precedes-line-clamp
Fix display class not removed when it precedes line-clamp class
2 parents 730b1c2 + c11411b commit 552d019

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/lib/default-config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1740,6 +1740,7 @@ export function getDefaultConfig() {
17401740
'fvn-figure': ['fvn-normal'],
17411741
'fvn-spacing': ['fvn-normal'],
17421742
'fvn-fraction': ['fvn-normal'],
1743+
'line-clamp': ['display', 'overflow'],
17431744
rounded: [
17441745
'rounded-s',
17451746
'rounded-e',

tests/conflicts-across-class-groups.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ test('touch classes do create conflicts correctly', () => {
3131
)
3232
expect(twMerge('touch-pan-x touch-pan-y touch-pinch-zoom touch-auto')).toBe('touch-auto')
3333
})
34+
35+
test('line-clamp classes do create conflicts correctly', () => {
36+
expect(twMerge('overflow-auto inline line-clamp-1')).toBe('line-clamp-1')
37+
expect(twMerge('line-clamp-1 overflow-auto inline')).toBe('line-clamp-1 overflow-auto inline')
38+
})

0 commit comments

Comments
 (0)