mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Add failing test
This commit is contained in:
parent
c8d87f84a2
commit
3f6d31e3ae
@ -684,3 +684,32 @@ test('plugin variants can wrap rules in another at-rule using the raw PostCSS AP
|
||||
expect(result.warnings().length).toBe(0)
|
||||
})
|
||||
})
|
||||
|
||||
test('nested variants are all applied', () => {
|
||||
const input = `
|
||||
@variants responsive {
|
||||
@variants hover {
|
||||
@variants focus {
|
||||
.banana { color: yellow; }
|
||||
.chocolate { color: brown; }
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const output = `
|
||||
@responsive {
|
||||
.banana { color: yellow; }
|
||||
.chocolate { color: brown; }
|
||||
.focus\\:banana:focus { color: yellow; }
|
||||
.focus\\:chocolate:focus { color: brown; }
|
||||
.hover\\:banana:hover { color: yellow; }
|
||||
.hover\\:chocolate:hover { color: brown; }
|
||||
}
|
||||
`
|
||||
|
||||
return run(input).then(result => {
|
||||
expect(result.css).toMatchCss(output)
|
||||
expect(result.warnings().length).toBe(0)
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user