Skip to content

Commit

Permalink
Add failing test for #57
Browse files Browse the repository at this point in the history
  • Loading branch information
barvian committed Nov 12, 2024
1 parent c92782a commit 6be3db8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/fluid-tailwind/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ it(`negates utilities that support negatives`, async () => {
`)
})

// #57
it(`negates utilities with arbitrary variants`, async () => {
const result = await run({
content: [
{
raw: html`<div class="data-[size]:~-mt-1/2"></div>`
}
]
})
expect(result.css).toMatchFormattedCss(css`
.data-\[size\]\:\~-mt-1\/2[data-size] {
margin-top: clamp(
-0.5rem,
-0.07rem + -0.45vw,
-0.25rem
); /* fluid from -0.25rem at 40rem to -0.5rem at 96rem */
}
`)
})

it(`doesn't negate utilities that don't support negatives`, async () => {
const result = await run({
content: [
Expand Down

0 comments on commit 6be3db8

Please sign in to comment.