@@ -325,12 +325,6 @@ describe('@apply', () => {
325325 }
326326 }
327327
328- @keyframes spin {
329- to {
330- transform: rotate(360deg);
331- }
332- }
333-
334328 @property --tw-translate-x {
335329 syntax: "*";
336330 inherits: false;
@@ -347,6 +341,12 @@ describe('@apply', () => {
347341 syntax: "*";
348342 inherits: false;
349343 initial-value: 0;
344+ }
345+
346+ @keyframes spin {
347+ to {
348+ transform: rotate(360deg);
349+ }
350350 }"
351351 ` )
352352 } )
@@ -1822,7 +1822,7 @@ describe('Parsing theme values from CSS', () => {
18221822 ` )
18231823 } )
18241824
1825- test ( 'theme values added as reference are not included in the output as variables' , async ( ) => {
1825+ test ( 'theme values added as reference are not included in the output as variables but emit fallback values ' , async ( ) => {
18261826 expect (
18271827 await compileCss (
18281828 css `
@@ -1875,6 +1875,16 @@ describe('Parsing theme values from CSS', () => {
18751875 ) . toMatchInlineSnapshot ( `
18761876 ".animate-foo {
18771877 animation: var(--animate-foo, foo 1s infinite);
1878+ }
1879+
1880+ @keyframes foo {
1881+ 0%, 100% {
1882+ color: red;
1883+ }
1884+
1885+ 50% {
1886+ color: #00f;
1887+ }
18781888 }"
18791889 ` )
18801890 } )
@@ -1916,6 +1926,16 @@ describe('Parsing theme values from CSS', () => {
19161926
19171927 .bg-pink {
19181928 background-color: var(--color-pink);
1929+ }
1930+
1931+ @keyframes foo {
1932+ 0%, 100% {
1933+ color: red;
1934+ }
1935+
1936+ 50% {
1937+ color: #00f;
1938+ }
19191939 }"
19201940 ` )
19211941 } )
@@ -3696,7 +3716,7 @@ it("should error when `layer(…)` is used, but it's not the first param", async
36963716 )
36973717} )
36983718
3699- describe ( '`@reference "…" reference `' , ( ) => {
3719+ describe ( '`@reference "…" imports `' , ( ) => {
37003720 test ( 'recursively removes styles' , async ( ) => {
37013721 let loadStylesheet = async ( id : string , base : string ) => {
37023722 if ( id === './foo/baz.css' ) {
@@ -3851,11 +3871,17 @@ describe('`@reference "…" reference`', () => {
38513871 ) . resolves . toMatchInlineSnapshot ( `
38523872 ".bar {
38533873 animation: var(--animate-spin, spin 1s linear infinite);
3874+ }
3875+
3876+ @keyframes spin {
3877+ to {
3878+ transform: rotate(360deg);
3879+ }
38543880 }"
38553881 ` )
38563882 } )
38573883
3858- test ( 'emits theme variables and keyframes defined inside @reference-ed files' , async ( ) => {
3884+ test ( 'emits CSS variable fallback and keyframes defined inside @reference-ed files' , async ( ) => {
38593885 let loadStylesheet = async ( id : string , base : string ) => {
38603886 switch ( id ) {
38613887 case './one.css' : {
@@ -3915,6 +3941,16 @@ describe('`@reference "…" reference`', () => {
39153941 ".bar {
39163942 animation: var(--animate-wiggle, wiggle 1s ease-in-out infinite);
39173943 color: var(--color-red, red);
3944+ }
3945+
3946+ @keyframes wiggle {
3947+ 0%, 100% {
3948+ transform: rotate(-3deg);
3949+ }
3950+
3951+ 50% {
3952+ transform: rotate(3deg);
3953+ }
39183954 }"
39193955 ` )
39203956 } )
0 commit comments