feat(css-prefix): color-adjust support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:11ae0c68b0e686e80871271e5d12e9bf5ad66b5b,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:cef7f5f2736247ed31692e797c3e63f9ef6c20be,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";
import borderRadius from "./prefixes/border-radius";
import boxShadow from "./prefixes/box-shadow";
import boxSizing from "./prefixes/box-sizing";
+import colorAdjust from "./prefixes/color-adjust";
import cursor from "./prefixes/cursor";
import display from "./prefixes/display";
import hyphens from "./prefixes/hyphens";
@@ -25,6 +26,7 @@ export default [
...borderRadius,
...boxShadow,
...boxSizing,
+ ...colorAdjust,
...cursor,
...display,
...hyphens,

ADD
internal/compiler/transforms/compile/css-handler/prefix/prefixes/color-adjust.ts
+import {
+ createPrefixVisitor,
+ prefixCSSProperty,
+} from "@internal/compiler/transforms/compile/css-handler/prefix/utils";
+
+function printRenamer(value: string) {
+ return value.startsWith("-webkit-")
+ ? value.replace("-webkit-", "-webkit-print-")
+ : value;
+}
+
+// https://github.com/Fyrd/caniuse/blob/main/features-json/css-color-adjust.json
+export default [
+ createPrefixVisitor({
+ name: "color-adjust",
+ enter(path) {
+ return prefixCSSProperty({
+ path,
+ propertyName: "color-adjust",
+ browserFeaturesKey: "css-color-adjust",
+ rename: printRenamer,
+ });
+ },
+ }),
+];

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/color-adjust/input.css
+.style {
+ color-adjust: economy;
+}
+
+.style {
+ color-adjust: exact;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/color-adjust/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 > color-adjust`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ color-adjust: economy;
+}
+
+.style {
+ color-adjust: exact;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ -webkit-print-color-adjust: economy;
+ color-adjust: economy;
+}
+
+.style {
+ -webkit-print-color-adjust: exact;
+ color-adjust: exact;
+}
+
+```

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

feat(css-prefix): color-adjust support (#1470)