Skip to content
Prev Previous commit
Next Next commit
extend test case
If you have even more `@utility` calls, then it also behaves
incorrectly. This means that we likely want a topological sort instead.
  • Loading branch information
RobinMalfait committed Jan 7, 2025
commit 5380f896c468f9fe7e9d14a16835371a72373ea9
26 changes: 21 additions & 5 deletions packages/tailwindcss/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,24 +470,40 @@ describe('@apply', () => {

@layer base {
body {
@apply my-flex;
@apply a;
}
}

@utility a {
@apply b;
}

@utility b {
@apply focus:c;
}

@utility c {
@apply my-flex!;
}

@utility my-flex {
@apply flex;
}
`,
['flex', 'my-flex'],
['a', 'b', 'c', 'flex', 'my-flex'],
),
).toMatchInlineSnapshot(`
".flex, .my-flex {
".a:focus, .b:focus, .c {
display: flex !important;
}

.flex, .my-flex {
display: flex;
}

@layer base {
body {
display: flex;
body:focus {
display: flex !important;
}
}"
`)
Expand Down