feat(css-prefix): animation support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:0055f8aa01426397ad32d8f585d38234119cfc98,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:22bc9528df4582b11f376b0f763a8da7141c04c6,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+import animation from "./prefixes/animation";
import borderRadius from "./prefixes/border-radius";
import boxShadow from "./prefixes/box-shadow";
import boxSizing from "./prefixes/box-sizing";
@@ -9,6 +10,7 @@ import transform from "./prefixes/transform";
import transition from "./prefixes/transition";
export default [
+ ...animation,
...borderRadius,
...boxShadow,
...boxSizing,

ADD
internal/compiler/transforms/compile/css-handler/prefix/prefixes/animation.ts
+import {
+ createPrefixVisitor,
+ prefixCSSProperty,
+} from "@internal/compiler/transforms/compile/css-handler/prefix/utils";
+
+// https://github.com/Fyrd/caniuse/blob/main/features-json/css-animation.json
+// https://github.com/postcss/autoprefixer/blob/main/data/prefixes.js#L86-L102
+export default [
+ "animation",
+ "animation-name",
+ "animation-duration",
+ "animation-delay",
+ "animation-direction",
+ "animation-fill-mode",
+ "animation-iteration-count",
+ "animation-play-state",
+ "animation-timing-function",
+].map((propertyName) =>
+ createPrefixVisitor({
+ name: propertyName,
+ enter(path) {
+ return prefixCSSProperty({
+ path,
+ propertyName,
+ browserFeaturesKey: "css-animation",
+ });
+ },
+ })
+);

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/animation/input.css
+.style {
+ text-align: center;
+ animation: 4s linear 0s infinite alternate move_eye;
+}
+
+.style {
+ animation-name: move_eye;
+ animation-duration: 4s;
+ animation-timing-function: linear;
+ animation-delay: 0s;
+ animation-iteration-count: 0;
+ animation-direction: normal;
+ animation-fill-mode: none;
+ animation-delay: 1s;
+ animation-play-state: paused;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/animation/input.test.md
+# `index.test.ts`
+
+**DO NOT MODIFY**. This file has been autogenerated. Run `rome test internal/compiler/transforms/compile/index.test.ts --update-snapshots` to update.
+
+## `css-handler > prefix > animation`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ text-align: center;
+ animation: 4s linear 0s infinite alternate move_eye;
+}
+
+.style {
+ animation-name: move_eye;
+ animation-duration: 4s;
+ animation-timing-function: linear;
+ animation-delay: 0s;
+ animation-iteration-count: 0;
+ animation-direction: normal;
+ animation-fill-mode: none;
+ animation-delay: 1s;
+ animation-play-state: paused;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ text-align: center;
+ -moz-animation: 4s linear 0s infinite alternate move_eye;
+ -webkit-animation: 4s linear 0s infinite alternate move_eye;
+ -o-animation: 4s linear 0s infinite alternate move_eye;
+ animation: 4s linear 0s infinite alternate move_eye;
+}
+
+.style {
+ -moz-animation-name: move_eye;
+ -webkit-animation-name: move_eye;
+ -o-animation-name: move_eye;
+ animation-name: move_eye;
+ -moz-animation-duration: 4s;
+ -webkit-animation-duration: 4s;
+ -o-animation-duration: 4s;
+ animation-duration: 4s;
+ -moz-animation-timing-function: linear;
+ -webkit-animation-timing-function: linear;
+ -o-animation-timing-function: linear;
+ animation-timing-function: linear;
+ -moz-animation-delay: 0s;
+ -webkit-animation-delay: 0s;
+ -o-animation-delay: 0s;
+ animation-delay: 0s;
+ -moz-animation-iteration-count: 0;
+ -webkit-animation-iteration-count: 0;
+ -o-animation-iteration-count: 0;
+ animation-iteration-count: 0;
+ -moz-animation-direction: normal;
+ -webkit-animation-direction: normal;
+ -o-animation-direction: normal;
+ animation-direction: normal;
+ -moz-animation-fill-mode: none;
+ -webkit-animation-fill-mode: none;
+ -o-animation-fill-mode: none;
+ animation-fill-mode: none;
+ animation-delay: 1s;
+ -moz-animation-play-state: paused;
+ -webkit-animation-play-state: paused;
+ -o-animation-play-state: paused;
+ animation-play-state: paused;
+}
+
+```

ADD
website/src/docs/css-handler/prefix/animation.md
+---
+title: Prefix animation
+layout: layouts/prefix.liquid
+showHero: false
+description: MISSING DOCUMENTATION
+eleventyNavigation:
+ key: css-handler/prefix/animation
+ parent: css-handler
+ title: animation
+---
+
+# animation
+
+MISSING DOCUMENTATION
\ No newline at end of file

feat(css-prefix): animation support (#1434)