Skip to content

Commit c1d0d64

Browse files
committed
add failing test
1 parent ac202ff commit c1d0d64

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

packages/tailwindcss/src/index.test.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,41 @@ describe('Parsing themes values from CSS', () => {
11701170
`)
11711171
})
11721172

1173+
test('`@keyframes` in `@theme` are generated when name contains a new line', async () => {
1174+
expect(
1175+
await compileCss(
1176+
css`
1177+
@theme {
1178+
--animate-very-long-animation-name: very-long-animation-name
1179+
var(
1180+
--very-long-animation-name-configuration,
1181+
2.5s ease-in-out 0s infinite normal none running
1182+
);
1183+
1184+
@keyframes very-long-animation-name {
1185+
to {
1186+
opacity: 1;
1187+
}
1188+
}
1189+
}
1190+
1191+
@tailwind utilities;
1192+
`,
1193+
['animate-very-long-animatino-name'],
1194+
),
1195+
).toMatchInlineSnapshot(`
1196+
":root, :host {
1197+
--animate-very-long-animation-name: very-long-animation-name var(--very-long-animation-name-configuration, 2.5s ease-in-out 0s infinite normal none running);
1198+
}
1199+
1200+
@keyframes very-long-animation-name {
1201+
to {
1202+
opacity: 1;
1203+
}
1204+
}"
1205+
`)
1206+
})
1207+
11731208
test('`@theme` values can be unset', async () => {
11741209
expect(
11751210
await compileCss(

0 commit comments

Comments
 (0)