Add test case for issue fixed by postcss-js 2.0.2
This commit is contained in:
parent
da24fba5c2
commit
6f441a47a2
1 changed files with 25 additions and 0 deletions
|
|
@ -877,6 +877,31 @@ test('plugins respect prefix and important options by default when adding utilit
|
|||
`)
|
||||
})
|
||||
|
||||
test('important utilities are not made double important when important option is used', () => {
|
||||
const { utilities } = processPlugins(
|
||||
[
|
||||
function({ addUtilities }) {
|
||||
addUtilities({
|
||||
'.rotate-90': {
|
||||
transform: 'rotate(90deg) !important',
|
||||
},
|
||||
})
|
||||
},
|
||||
],
|
||||
makeConfig({
|
||||
important: true,
|
||||
})
|
||||
)
|
||||
|
||||
expect(css(utilities)).toMatchCss(`
|
||||
@variants {
|
||||
.rotate-90 {
|
||||
transform: rotate(90deg) !important
|
||||
}
|
||||
}
|
||||
`)
|
||||
})
|
||||
|
||||
test("component declarations respect the 'prefix' option by default", () => {
|
||||
const { components } = processPlugins(
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue