Skip to content

Commit 8708558

Browse files
committed
Failing test for tokenizing setting line-height as custom property
1 parent 92b39bb commit 8708558

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

test/parse.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ it('parses unofficial --mixins', () => {
8787
expect(root.first.first.selector).toEqual('--x')
8888
})
8989

90+
it('parses --mixins in font', () => {
91+
let root = parse('html { font: 1em/var(--line-height); }')
92+
expect(root.toString()).toEqual('html { font: 1em/var(--line-height); }')
93+
})
94+
9095
it('ignores symbols before declaration', () => {
9196
let root = parse('a { :one: 1 }')
9297
expect(root.first.first.raws.before).toEqual(' :')

test/tokenize.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@ it('tokenizes quoted urls', () => {
153153
])
154154
})
155155

156+
it('supports line-height set from custom property', () => {
157+
run('1em/var(--line-height)', [
158+
['word', '1em', 1, 1, 1, 3],
159+
['word', '/', 1, 4, 1, 4],
160+
['word', 'var', 1, 5, 1, 5],
161+
['brackets', '(--line-height)', 1, 8, 1, 22]
162+
])
163+
})
164+
156165
it('tokenizes at-symbol', () => {
157166
run('@', [['at-word', '@', 1, 1, 1, 1]])
158167
})

0 commit comments

Comments
 (0)