Skip to content

Commit 41341a4

Browse files
committed
Serialize text-decoration-trim with the shortest value
w3c/csswg-drafts#9340
1 parent ca636a6 commit 41341a4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

__tests__/style.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,13 @@ describe('text-align-all', () => {
10461046
expect(style.textAlignAll).toBe('')
10471047
})
10481048
})
1049+
describe('text-decoration-trim', () => {
1050+
test('valid', () => {
1051+
const style = createStyleBlock()
1052+
style.textDecorationTrim = '1px 1px'
1053+
expect(style.textDecorationTrim).toBe('1px')
1054+
})
1055+
})
10491056
describe('text-justify', () => {
10501057
test('valid', () => {
10511058
const style = createStyleBlock()

lib/serialize.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3479,6 +3479,7 @@ function representDeclarationValue({ name, pending, source, value }) {
34793479
case 'subscript-size-override':
34803480
case 'superscript-position-override':
34813481
case 'superscript-size-override':
3482+
case 'text-decoration-trim':
34823483
return representSides(value.map(serializeCSSComponentValue))
34833484
case 'border-image-slice':
34843485
case 'mask-border-slice':

0 commit comments

Comments
 (0)