diff --git a/src/rules/animation.ts b/src/rules/animation.ts index f11f8ed..eb00fda 100644 --- a/src/rules/animation.ts +++ b/src/rules/animation.ts @@ -65,7 +65,7 @@ export const animations: Rule[] = [ ], // others - [/^animate-(?:iteration-|count-|iteration-count-)(.+)$/, ([, d]) => ({ 'animation-iteration-count': h.bracket.cssvar(d) ?? d.replace(/\-/g, ',') }), { autocomplete: ['animate-(iteration|count|iteration-count)', 'animate-(iteration|count|iteration-count)-'] }], + [/^animate-(?:iteration-count-|iteration-|count-)(.+)$/, ([, d]) => ({ 'animation-iteration-count': h.bracket.cssvar(d) ?? d.replace(/\-/g, ',') }), { autocomplete: ['animate-(iteration|count|iteration-count)', 'animate-(iteration|count|iteration-count)-'] }], [/^animate-(play-state-|play-|state-)?(.+)$/, ([, t, d]) => ['paused', 'running', ...[t ? globalKeywords : []]].includes(d) ? { 'animation-play-state': d } : undefined, { diff --git a/test/assets/output/preset-mini-targets.css b/test/assets/output/preset-mini-targets.css index 5a926cd..d5f4282 100644 --- a/test/assets/output/preset-mini-targets.css +++ b/test/assets/output/preset-mini-targets.css @@ -35,11 +35,11 @@ page,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate- .animate-normal{animation-direction:normal;} .animate-reverse{animation-direction:reverse;} .animate-count-2\.4{animation-iteration-count:2.4;} -.animate-iteration-2{animation-iteration-count:2;} -.animate-iteration-count-\[2\,4\,infinity\]{animation-iteration-count:count,[2,4,infinity];} -.animate-iteration-count-\$variable{animation-iteration-count:count,$variable;} -.animate-iteration-count-2{animation-iteration-count:count,2;} -.animate-iteration-count-2-4-infinity{animation-iteration-count:count,2,4,infinity;} +.animate-iteration-2, +.animate-iteration-count-2{animation-iteration-count:2;} +.animate-iteration-count-\[2\,4\,infinity\], +.animate-iteration-count-2-4-infinity{animation-iteration-count:2,4,infinity;} +.animate-iteration-count-\$variable{animation-iteration-count:var(--variable);} .animate-paused, .animate-play-paused{animation-play-state:paused;} .animate-play-state-running, diff --git a/test/assets/output/preset-weapp-rules.css b/test/assets/output/preset-weapp-rules.css index a8ac76f..01fbe20 100644 --- a/test/assets/output/preset-weapp-rules.css +++ b/test/assets/output/preset-weapp-rules.css @@ -35,11 +35,11 @@ page,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate- .animate-normal{animation-direction:normal;} .animate-reverse{animation-direction:reverse;} .animate-count-2_dl11_4{animation-iteration-count:2.4;} -.animate-iteration-2{animation-iteration-count:2;} -.animate-iteration-count-_do11_variable{animation-iteration-count:count,$variable;} -.animate-iteration-count-_lfl11_2_lco11_4_lco11_infinity_lfr11_{animation-iteration-count:count,[2,4,infinity];} -.animate-iteration-count-2{animation-iteration-count:count,2;} -.animate-iteration-count-2-4-infinity{animation-iteration-count:count,2,4,infinity;} +.animate-iteration-2, +.animate-iteration-count-2{animation-iteration-count:2;} +.animate-iteration-count-_do11_variable{animation-iteration-count:var(--variable);} +.animate-iteration-count-_lfl11_2_lco11_4_lco11_infinity_lfr11_, +.animate-iteration-count-2-4-infinity{animation-iteration-count:2,4,infinity;} .animate-paused, .animate-play-paused{animation-play-state:paused;} .animate-play-state-running, diff --git a/test/assets/output/preset-weapp.css b/test/assets/output/preset-weapp.css index be7f52e..ba3cabc 100644 --- a/test/assets/output/preset-weapp.css +++ b/test/assets/output/preset-weapp.css @@ -35,11 +35,11 @@ page,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate- .animate-normal{animation-direction:normal;} .animate-reverse{animation-direction:reverse;} .animate-count-2_dl_4{animation-iteration-count:2.4;} -.animate-iteration-2{animation-iteration-count:2;} -.animate-iteration-count-_do_variable{animation-iteration-count:count,$variable;} -.animate-iteration-count-_lfl_2_lco_4_lco_infinity_lfr_{animation-iteration-count:count,[2,4,infinity];} -.animate-iteration-count-2{animation-iteration-count:count,2;} -.animate-iteration-count-2-4-infinity{animation-iteration-count:count,2,4,infinity;} +.animate-iteration-2, +.animate-iteration-count-2{animation-iteration-count:2;} +.animate-iteration-count-_do_variable{animation-iteration-count:var(--variable);} +.animate-iteration-count-_lfl_2_lco_4_lco_infinity_lfr_, +.animate-iteration-count-2-4-infinity{animation-iteration-count:2,4,infinity;} .animate-paused, .animate-play-paused{animation-play-state:paused;} .animate-play-state-running,