Ensure @apply of a utility with multiple definitions works (#5870)
This commit is contained in:
parent
de1bdb4f5d
commit
1218b3ee7e
1 changed files with 37 additions and 0 deletions
|
|
@ -428,3 +428,40 @@ it('should remove duplicate properties when using apply with similar properties'
|
|||
`)
|
||||
})
|
||||
})
|
||||
|
||||
it('should apply all the definitions of a class', () => {
|
||||
let config = {
|
||||
content: [{ raw: html`<div class="foo"></div>` }],
|
||||
plugins: [],
|
||||
}
|
||||
|
||||
let input = css`
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer utilities {
|
||||
.aspect-w-1 {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.aspect-w-1 {
|
||||
--tw-aspect-w: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.foo {
|
||||
@apply aspect-w-1;
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
return run(input, config).then((result) => {
|
||||
return expect(result.css).toMatchFormattedCss(css`
|
||||
.foo {
|
||||
position: relative;
|
||||
--tw-aspect-w: 1;
|
||||
}
|
||||
`)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue