feat(css-prefix): add shape support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:749967bea1e11ac9cccf738d5902a298663399eb,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:817f095cd37941c51ee5d0b64fb7ec9cf75789c6,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 appearance from "./prefixes/appearance";
import backdropFilter from "./prefixes/backdrop-filter";
@@ -20,6 +20,7 @@ import multicolumn from "./prefixes/multicolumn";
import position from "./prefixes/position";
import regions from "./prefixes/regions";
import scrollSnapType from "./prefixes/scroll-snap-type";
+import shape from "./prefixes/shape";
import tabSize from "./prefixes/tab-size";
import textAlignLast from "./prefixes/text-align-last";
import textEmphasis from "./prefixes/text-emphasis";
@@ -54,6 +55,7 @@ export default [
...position,
...regions,
...scrollSnapType,
+ ...shape,
...tabSize,
...textAlignLast,
...textEmphasis,

ADD
internal/compiler/transforms/compile/css-handler/prefix/prefixes/shape.ts
+import {
+ createPrefixVisitor,
+ prefixCSSProperty,
+} from "@internal/compiler/transforms/compile/css-handler/prefix/utils";
+
+// https://github.com/Fyrd/caniuse/blob/main/features-json/css-shapes.json
+export default ["shape-margin", "shape-outside", "shape-image-threshold"].map((
+ propertyName,
+) =>
+ createPrefixVisitor({
+ name: propertyName,
+ enter(path) {
+ return prefixCSSProperty({
+ path,
+ propertyName,
+ browserFeaturesKey: "css-shapes",
+ });
+ },
+ })
+);

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/shape/input.css
+.style {
+ text-align: center;
+ shape-margin: 0%;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-margin: 0%;
+ shape-margin: 0%;
+}
+
+.style {
+ text-align: center;
+ shape-outside: none;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-outside: none;
+ shape-outside: none;
+}
+
+.style {
+ text-align: center;
+ shape-image-threshold: inherit;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-image-threshold: inherit;
+ shape-image-threshold: inherit;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/shape/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 > shape`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ text-align: center;
+ shape-margin: 0%;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-margin: 0%;
+ shape-margin: 0%;
+}
+
+.style {
+ text-align: center;
+ shape-outside: none;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-outside: none;
+ shape-outside: none;
+}
+
+.style {
+ text-align: center;
+ shape-image-threshold: inherit;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-image-threshold: inherit;
+ shape-image-threshold: inherit;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ text-align: center;
+ -webkit-shape-margin: 0%;
+ shape-margin: 0%;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-margin: 0%;
+ shape-margin: 0%;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-outside: none;
+ shape-outside: none;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-outside: none;
+ shape-outside: none;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-image-threshold: inherit;
+ shape-image-threshold: inherit;
+}
+
+.style {
+ text-align: center;
+ -webkit-shape-image-threshold: inherit;
+ shape-image-threshold: inherit;
+}
+
+```

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

feat(css-prefix): add shape support (#1500)

Co-authored-by: chucho <chucho@syneforge.com>
Co-authored-by: sergeypriakhin <>