Skip to content

Commit 13fac81

Browse files
Remove usages of @import "…" theme(reference) in tests
1 parent 604be56 commit 13fac81

11 files changed

+28
-24
lines changed

integrations/cli/index.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ test(
643643
}
644644
`,
645645
'index.css': css`
646-
@import 'tailwindcss/theme' theme(reference);
646+
@reference 'tailwindcss/theme';
647647
648648
/* (1) */
649649
/* - Only './src' should be auto-scanned, not the current working directory */
@@ -774,7 +774,7 @@ test(
774774
}
775775
`,
776776
'project-a/src/index.css': css`
777-
@import 'tailwindcss/theme' theme(reference);
777+
@reference 'tailwindcss/theme';
778778
779779
/* Run auto-content detection in ../../project-b */
780780
@import 'tailwindcss/utilities' source('../../project-b');
@@ -1132,7 +1132,7 @@ test(
11321132
}
11331133
`,
11341134
'index.css': css`
1135-
@import 'tailwindcss/theme' theme(reference);
1135+
@reference 'tailwindcss/theme';
11361136
11371137
/* (1) */
11381138
/* - Only './src' should be auto-scanned, not the current working directory */

integrations/cli/standalone.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test(
3535
<div class="aspect-w-16"></div>
3636
`,
3737
'src/index.css': css`
38-
@import 'tailwindcss/theme' theme(reference);
38+
@reference 'tailwindcss/theme';
3939
@import 'tailwindcss/utilities';
4040
4141
@plugin '@tailwindcss/forms';

integrations/postcss/index.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ test(
659659
}
660660
`,
661661
'index.css': css`
662-
@import 'tailwindcss/theme' theme(reference);
662+
@reference 'tailwindcss/theme';
663663
664664
/* (1) */
665665
/* - Only './src' should be auto-scanned, not the current working directory */
@@ -799,7 +799,7 @@ test(
799799
}
800800
`,
801801
'project-a/src/index.css': css`
802-
@import 'tailwindcss/theme' theme(reference);
802+
@reference 'tailwindcss/theme';
803803
804804
/* Run auto-content detection in ../../project-b */
805805
@import 'tailwindcss/utilities' source('../../project-b');
@@ -1163,7 +1163,7 @@ test(
11631163
}
11641164
`,
11651165
'index.css': css`
1166-
@import 'tailwindcss/theme' theme(reference);
1166+
@reference 'tailwindcss/theme';
11671167
11681168
/* (1) */
11691169
/* - Only './src' should be auto-scanned, not the current working directory */

integrations/postcss/multi-root.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test(
2525
<div class="one:underline two:underline"></div>
2626
`,
2727
'src/shared.css': css`
28-
@import 'tailwindcss/theme' theme(reference);
28+
@reference 'tailwindcss/theme';
2929
@import 'tailwindcss/utilities';
3030
`,
3131
'src/root1.css': css`

integrations/postcss/next.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test(
5151
}
5252
`,
5353
'app/globals.css': css`
54-
@import 'tailwindcss/theme' theme(reference);
54+
@reference 'tailwindcss/theme';
5555
@import 'tailwindcss/utilities';
5656
`,
5757
},
@@ -122,7 +122,7 @@ describe.each(['turbo', 'webpack'])('%s', (bundler) => {
122122
}
123123
`,
124124
'app/globals.css': css`
125-
@import 'tailwindcss/theme' theme(reference);
125+
@reference 'tailwindcss/theme';
126126
@import 'tailwindcss/utilities';
127127
`,
128128
},

integrations/postcss/plugins.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test(
2626
<div className="ui-open:flex"></div>
2727
`,
2828
'src/index.css': css`
29-
@import 'tailwindcss/theme' theme(reference);
29+
@reference 'tailwindcss/theme';
3030
@import 'tailwindcss/utilities';
3131
@plugin '@headlessui/tailwindcss';
3232
`,
@@ -65,7 +65,7 @@ test(
6565
<div className="ui-open:flex"></div>
6666
`,
6767
'src/index.css': css`
68-
@import 'tailwindcss/theme' theme(reference);
68+
@reference 'tailwindcss/theme';
6969
@import 'tailwindcss/utilities';
7070
@plugin '@headlessui/tailwindcss';
7171
`,

integrations/vite/index.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe.each(['postcss', 'lightningcss'])('%s', (transformer) => {
6262
}
6363
`,
6464
'project-a/src/index.css': css`
65-
@import 'tailwindcss/theme' theme(reference);
65+
@reference 'tailwindcss/theme';
6666
@import 'tailwindcss/utilities';
6767
@config '../tailwind.config.js';
6868
@source '../../project-b/src/**/*.html';
@@ -147,7 +147,7 @@ describe.each(['postcss', 'lightningcss'])('%s', (transformer) => {
147147
}
148148
`,
149149
'project-a/src/index.css': css`
150-
@import 'tailwindcss/theme' theme(reference);
150+
@reference 'tailwindcss/theme';
151151
@import 'tailwindcss/utilities';
152152
@config '../tailwind.config.js';
153153
@source '../../project-b/src/**/*.html';
@@ -291,7 +291,7 @@ describe.each(['postcss', 'lightningcss'])('%s', (transformer) => {
291291
}
292292
`,
293293
'project-a/src/index.css': css`
294-
@import 'tailwindcss/theme' theme(reference);
294+
@reference 'tailwindcss/theme';
295295
@import 'tailwindcss/utilities';
296296
@import './custom-theme.css';
297297
@config '../tailwind.config.js';

integrations/vite/multi-root.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test(
4343
</body>
4444
`,
4545
'src/shared.css': css`
46-
@import 'tailwindcss/theme' theme(reference);
46+
@reference 'tailwindcss/theme';
4747
@import 'tailwindcss/utilities';
4848
`,
4949
'src/root1.css': css`
@@ -119,7 +119,7 @@ test(
119119
</body>
120120
`,
121121
'src/shared.css': css`
122-
@import 'tailwindcss/theme' theme(reference);
122+
@reference 'tailwindcss/theme';
123123
@import 'tailwindcss/utilities';
124124
`,
125125
'src/root1.css': css`

integrations/vite/other-transforms.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function createSetup(transformer: 'postcss' | 'lightningcss') {
4747
</body>
4848
`,
4949
'src/index.css': css`
50-
@import 'tailwindcss/theme' theme(reference);
50+
@reference 'tailwindcss/theme';
5151
@import 'tailwindcss/utilities';
5252
5353
.foo {
@@ -111,7 +111,7 @@ describe.each(['postcss', 'lightningcss'] as const)('%s', (transformer) => {
111111
await fs.write(
112112
'src/index.css',
113113
css`
114-
@import 'tailwindcss/theme' theme(reference);
114+
@reference 'tailwindcss/theme';
115115
@import 'tailwindcss/utilities';
116116
117117
.foo {
@@ -155,7 +155,7 @@ describe.each(['postcss', 'lightningcss'] as const)('%s', (transformer) => {
155155
await fs.write(
156156
'src/index.css',
157157
css`
158-
@import 'tailwindcss/theme' theme(reference);
158+
@reference 'tailwindcss/theme';
159159
@import 'tailwindcss/utilities';
160160
161161
.foo {

integrations/vite/resolvers.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe.each(['postcss', 'lightningcss'])('%s', (transformer) => {
4949
@plugin '#js-alias';
5050
`,
5151
'src/alias.css': css`
52-
@import 'tailwindcss/theme' theme(reference);
52+
@reference 'tailwindcss/theme';
5353
@import 'tailwindcss/utilities';
5454
`,
5555
'src/plugin.js': js`
@@ -117,7 +117,7 @@ describe.each(['postcss', 'lightningcss'])('%s', (transformer) => {
117117
@plugin '#js-alias';
118118
`,
119119
'src/alias.css': css`
120-
@import 'tailwindcss/theme' theme(reference);
120+
@reference 'tailwindcss/theme';
121121
@import 'tailwindcss/utilities';
122122
`,
123123
'src/plugin.js': js`

packages/@tailwindcss-postcss/src/index.test.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ test('@apply can be used without emitting the theme in the CSS file', async () =
9090

9191
let result = await processor.process(
9292
css`
93-
@import 'tailwindcss/theme.css' theme(reference);
93+
@reference 'tailwindcss/theme.css';
9494
.foo {
9595
@apply text-red-500;
9696
}
@@ -99,7 +99,11 @@ test('@apply can be used without emitting the theme in the CSS file', async () =
9999
)
100100

101101
expect(result.css.trim()).toMatchInlineSnapshot(`
102-
".foo {
102+
":root, :host {
103+
--color-red-500: oklch(.637 .237 25.331);
104+
}
105+
106+
.foo {
103107
color: var(--color-red-500);
104108
}"
105109
`)

0 commit comments

Comments
 (0)