mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
add test to prove @supports is kept in @layer rule (#5992)
This commit is contained in:
parent
79e3e098d2
commit
7eabb74bec
@ -299,3 +299,40 @@ test('layers are grouped and inserted at the matching @tailwind rule', () => {
|
||||
`)
|
||||
})
|
||||
})
|
||||
|
||||
it('should keep `@supports` rules inside `@layer`s', () => {
|
||||
let config = {
|
||||
content: [{ raw: html`<div class="test"></div>` }],
|
||||
plugins: [],
|
||||
}
|
||||
|
||||
let input = css`
|
||||
@tailwind utilities;
|
||||
|
||||
@layer utilities {
|
||||
.test {
|
||||
--tw-test: 1;
|
||||
}
|
||||
|
||||
@supports (backdrop-filter: blur(1px)) {
|
||||
.test {
|
||||
--tw-test: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
return run(input, config).then((result) => {
|
||||
return expect(result.css).toMatchFormattedCss(css`
|
||||
.test {
|
||||
--tw-test: 1;
|
||||
}
|
||||
|
||||
@supports (backdrop-filter: blur(1px)) {
|
||||
.test {
|
||||
--tw-test: 0.9;
|
||||
}
|
||||
}
|
||||
`)
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user