Skip to content

Commit

Permalink
Merge pull request #347 from dcastil/bugfix/345/fix-display-not-remov…
Browse files Browse the repository at this point in the history
…ed-when-it-precedes-line-clamp

Fix display class not removed when it precedes line-clamp class
  • Loading branch information
dcastil authored Nov 18, 2023
2 parents 730b1c2 + c11411b commit 552d019
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/default-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
5 changes: 5 additions & 0 deletions tests/conflicts-across-class-groups.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})

0 comments on commit 552d019

Please sign in to comment.