Skip to content

Commit 8bfb0fc

Browse files
committed
fix: remove 'solid' from border-bottom output in toTailwindcss function
1 parent 08b8081 commit 8bfb0fc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/border.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function border(key: string, val: string) {
6262
const keys = key.split('-')
6363
if (keys.slice(-1)[0] === 'radius')
6464
return value.split(' ').map(v => `${important}rounded-${keys.slice(1, -1).map(s => s[0]).join('')}${getVal(v)}`).join(' ')
65-
return value.split(' ').map(v => `${important}border-${key.split('-')[1][0]}${getVal(v)}`).join(' ')
65+
return value.split(' ').filter(item => item !== 'solid').map(v => `${important}border-${key.split('-')[1][0]}${getVal(v)}`).join(' ')
6666
}
6767

6868
if (key.startsWith('border-image'))

test/border.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('border', () => {
88
})
99

1010
it('border-bottom: #333;', () => {
11-
expect(toTailwindcss('border-bottom: 1px solid var(--default, red);')).toBe('border-b-[1px] border-b-solid border-b-[var(--default,red)]')
11+
expect(toTailwindcss('border-bottom: 1px solid var(--default, red);')).toBe('border-b-[1px] border-b-[var(--default,red)]')
1212
})
1313
})
1414

0 commit comments

Comments
 (0)