Skip to content

Commit e1d814d

Browse files
committed
re-set borderStyle for directional shorthands
1 parent d8b5629 commit e1d814d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/__tests__/border.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,30 @@ it('transforms bottom direction border shorthand', () => {
6868
expect(transformCss([['border-bottom', '2px dashed #f00']])).toEqual({
6969
borderBottomWidth: 2,
7070
borderBottomColor: '#f00',
71-
borderBottomStyle: 'dashed',
71+
borderStyle: 'dashed',
7272
})
7373
})
7474

7575
it('transforms left direction border shorthand', () => {
7676
expect(transformCss([['border-left', '2px dashed #f00']])).toEqual({
7777
borderLeftWidth: 2,
7878
borderLeftColor: '#f00',
79-
borderLeftStyle: 'dashed',
79+
borderStyle: 'dashed',
8080
})
8181
})
8282

8383
it('transforms right direction border shorthand', () => {
8484
expect(transformCss([['border-right', '2px dashed #f00']])).toEqual({
8585
borderRightWidth: 2,
8686
borderRightColor: '#f00',
87-
borderRightStyle: 'dashed',
87+
borderStyle: 'dashed',
8888
})
8989
})
9090

9191
it('transforms top direction border shorthand', () => {
9292
expect(transformCss([['border-top', '2px dashed #f00']])).toEqual({
9393
borderTopWidth: 2,
9494
borderTopColor: '#f00',
95-
borderTopStyle: 'dashed',
95+
borderStyle: 'dashed',
9696
})
9797
})

src/transforms/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const createBorderFactory = (direction = '') =>
3333
tokens: [COLOR],
3434
default: 'black',
3535
},
36-
[`border${direction}Style`]: {
36+
borderStyle: {
3737
tokens: [regExpToken(/^(solid|dashed|dotted)$/)],
3838
default: 'solid',
3939
},

0 commit comments

Comments
 (0)