feat(css-prefix): cursor support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:11c4f4d54e6311af362fec292ee5bffe5ebf04df,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:c38d60ce89df872ad613cfd746a4aaeba1a69016,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 cursor from "./prefixes/cursor";
import display from "./prefixes/display";
import hyphens from "./prefixes/hyphens";
import multicolumn from "./prefixes/multicolumn";
@@ -23,6 +24,7 @@ export default [
...borderRadius,
...boxShadow,
...boxSizing,
+ ...cursor,
...display,
...hyphens,
...multicolumn,

ADD
internal/compiler/transforms/compile/css-handler/prefix/prefixes/cursor.ts
+import {
+ createPrefixVisitor,
+ prefixCSSValue,
+} from "@internal/compiler/transforms/compile/css-handler/prefix/utils";
+
+export default [
+ // https://github.com/Fyrd/caniuse/blob/main/features-json/css3-cursors-newer.json
+ ...["zoom-in", "zoom-out"].map((value) =>
+ createPrefixVisitor({
+ name: `cursor/${value}`,
+ enter(path) {
+ return prefixCSSValue({
+ path,
+ propertyName: "cursor",
+ value,
+ browserFeaturesKey: "css3-cursors-newer",
+ });
+ },
+ })
+ ),
+ // https://github.com/Fyrd/caniuse/blob/main/features-json/css3-cursors-grab.json
+ ...["grab", "grabbing"].map((value) =>
+ createPrefixVisitor({
+ name: `cursor/${value}`,
+ enter(path) {
+ return prefixCSSValue({
+ path,
+ propertyName: "cursor",
+ value,
+ browserFeaturesKey: "css3-cursors-grab",
+ });
+ },
+ })
+ ),
+];

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/cursor/input.css
+.style {
+ cursor: none
+}
+
+.style {
+ cursor: zoom-in;
+}
+
+.style {
+ cursor: zoom-out;
+}
+
+.style {
+ cursor: grab;
+}
+
+.style {
+ cursor: grabbing;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/cursor/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 > cursor`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ cursor: none
+}
+
+.style {
+ cursor: zoom-in;
+}
+
+.style {
+ cursor: zoom-out;
+}
+
+.style {
+ cursor: grab;
+}
+
+.style {
+ cursor: grabbing;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ cursor: none;
+}
+
+.style {
+ cursor: -moz-zoom-in;
+ cursor: -webkit-zoom-in;
+ cursor: zoom-in;
+}
+
+.style {
+ cursor: -moz-zoom-out;
+ cursor: -webkit-zoom-out;
+ cursor: zoom-out;
+}
+
+.style {
+ cursor: -moz-grab;
+ cursor: -webkit-grab;
+ cursor: grab;
+}
+
+.style {
+ cursor: -moz-grabbing;
+ cursor: -webkit-grabbing;
+ cursor: grabbing;
+}
+
+```

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

feat(css-prefix): cursor support (#1457)