We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 608b139 commit eeb44e0Copy full SHA for eeb44e0
packages/tailwindcss/src/index.test.ts
@@ -461,6 +461,40 @@ describe('@apply', () => {
461
}"
462
`)
463
})
464
+
465
+ it('should recursively apply with custom `@utility`, which is used before it is defined', async () => {
466
+ expect(
467
+ await compileCss(
468
+ css`
469
+ @tailwind utilities;
470
471
+ @layer base {
472
+ body {
473
+ @apply my-flex;
474
+ }
475
476
477
+ @utility my-flex {
478
+ @apply flex;
479
+ /* margin: calc(theme(--spacing) * 4); */
480
481
+ `,
482
+ ['flex', 'my-flex'],
483
+ ),
484
+ ).toMatchInlineSnapshot(`
485
+ ".flex {
486
+ display: flex;
487
488
489
490
491
492
493
494
495
+ }"
496
+ `)
497
+ })
498
499
500
describe('arbitrary variants', () => {
0 commit comments