Skip to content

Commit fc24aad

Browse files
committed
add additional test to ensure child selectors are working as expected
1 parent ec404c0 commit fc24aad

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/tailwindcss/src/css-parser.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,18 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => {
610610
},
611611
])
612612
})
613+
614+
it('should parse a multi-line selector and keep significant spaces around', () => {
615+
expect(
616+
parse(['.foo,', '.bar,', '.baz\t\n \n .qux', '{', 'color:red;', '}'].join('\n')),
617+
).toEqual([
618+
{
619+
kind: 'rule',
620+
selector: '.foo, .bar, .baz .qux',
621+
nodes: [{ kind: 'declaration', property: 'color', value: 'red', important: false }],
622+
},
623+
])
624+
})
613625
})
614626

615627
describe('at-rules', () => {

0 commit comments

Comments
 (0)