feat(css-prefix): image-set support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:c38d60ce89df872ad613cfd746a4aaeba1a69016,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:11ae0c68b0e686e80871271e5d12e9bf5ad66b5b,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";
@@ -8,6 +8,7 @@ import boxSizing from "./prefixes/box-sizing";
import cursor from "./prefixes/cursor";
import display from "./prefixes/display";
import hyphens from "./prefixes/hyphens";
+import imageSet from "./prefixes/image-set";
import multicolumn from "./prefixes/multicolumn";
import position from "./prefixes/position";
import textOrientation from "./prefixes/text-orientation";
@@ -27,6 +28,7 @@ export default [
...cursor,
...display,
...hyphens,
+ ...imageSet,
...multicolumn,
...position,
...textOrientation,

ADD
internal/compiler/transforms/compile/css-handler/prefix/prefixes/image-set.ts
+import {
+ createPrefixVisitor,
+ prefixCSSValue,
+} from "@internal/compiler/transforms/compile/css-handler/prefix/utils";
+
+// https://github.com/Fyrd/caniuse/blob/main/features-json/css-image-set.json
+export default [
+ "background",
+ "background-image",
+ "border-image",
+ "cursor",
+ "mask",
+ "mask-image",
+ "list-style",
+ "list-style-image",
+ "content",
+].map((propertyName) =>
+ createPrefixVisitor({
+ name: `${propertyName}/image-set`,
+ enter(path) {
+ return prefixCSSValue({
+ path,
+ propertyName,
+ value: "image-set",
+ browserFeaturesKey: "css-image-set",
+ });
+ },
+ })
+);

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/image-set/input.css
+.style {
+ content: image-set;
+}
+
+.style {
+ background: image-set;
+}
+
+.style {
+ background-image: image-set;
+}
+
+.style {
+ border-image: image-set;
+}
+
+.style {
+ cursor: image-set;
+}
+
+.style {
+ mask: image-set;
+}
+
+.style {
+ mask-image: image-set;
+}
+
+.style {
+ list-style: image-set;
+}
+
+.style {
+ list-style-image: image-set;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/image-set/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 > image-set`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ content: image-set;
+}
+
+.style {
+ background: image-set;
+}
+
+.style {
+ background-image: image-set;
+}
+
+.style {
+ border-image: image-set;
+}
+
+.style {
+ cursor: image-set;
+}
+
+.style {
+ mask: image-set;
+}
+
+.style {
+ mask-image: image-set;
+}
+
+.style {
+ list-style: image-set;
+}
+
+.style {
+ list-style-image: image-set;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ content: -webkit-image-set;
+ content: image-set;
+}
+
+.style {
+ background: -webkit-image-set;
+ background: image-set;
+}
+
+.style {
+ background-image: -webkit-image-set;
+ background-image: image-set;
+}
+
+.style {
+ border-image: -webkit-image-set;
+ border-image: image-set;
+}
+
+.style {
+ cursor: -webkit-image-set;
+ cursor: image-set;
+}
+
+.style {
+ mask: -webkit-image-set;
+ mask: image-set;
+}
+
+.style {
+ mask-image: -webkit-image-set;
+ mask-image: image-set;
+}
+
+.style {
+ list-style: -webkit-image-set;
+ list-style: image-set;
+}
+
+.style {
+ list-style-image: -webkit-image-set;
+ list-style-image: image-set;
+}
+
+```

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

feat(css-prefix): image-set support (#1468)