Skip to content

Commit 02c210e

Browse files
authored
Merge pull request #112 from dcastil/bugfix/111/fix-w-fit
Fix overriding w-full with w-fit not working
2 parents 999af49 + e427449 commit 02c210e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/lib/default-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ export function getDefaultConfig() {
531531
* Width
532532
* @see https://tailwindcss.com/docs/width
533533
*/
534-
w: [{ w: ['auto', 'min', 'max', spacing] }],
534+
w: [{ w: ['auto', 'min', 'max', 'fit', spacing] }],
535535
/**
536536
* Min-Width
537537
* @see https://tailwindcss.com/docs/min-width

tests/class-group-conflicts.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { twMerge } from '../src'
22

33
test('merges classes from same group correctly', () => {
44
expect(twMerge('overflow-x-auto overflow-x-hidden')).toBe('overflow-x-hidden')
5+
expect(twMerge('w-full w-fit')).toBe('w-fit')
56
expect(twMerge('overflow-x-auto overflow-x-hidden overflow-x-scroll')).toBe('overflow-x-scroll')
67
expect(twMerge('overflow-x-auto hover:overflow-x-hidden overflow-x-scroll')).toBe(
78
'hover:overflow-x-hidden overflow-x-scroll'

0 commit comments

Comments
 (0)