feat(css-prefix): user-select support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:60579f9e847f6d8718049a94adab44348f2e6bad,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:44fa10c83c1933e066127255038cbce06cd6327a,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 backdropFilter from "./prefixes/backdrop-filter";
import borderRadius from "./prefixes/border-radius";
@@ -9,6 +9,7 @@ import multicolumn from "./prefixes/multicolumn";
import position from "./prefixes/position";
import transform from "./prefixes/transform";
import transition from "./prefixes/transition";
+import userSelect from "./prefixes/user-select";
export default [
...animation,
@@ -21,5 +22,6 @@ export default [
...position,
...transform,
...transition,
+ ...userSelect,
];
/* GENERATED:END(id:main) */

ADD
internal/compiler/transforms/compile/css-handler/prefix/prefixes/user-select.ts
+import {
+ createPrefixVisitor,
+ prefixCSSProperty,
+} from "@internal/compiler/transforms/compile/css-handler/prefix/utils";
+
+// https://github.com/Fyrd/caniuse/blob/main/features-json/user-select-none.json
+// https://github.com/postcss/autoprefixer/blob/main/data/prefixes.js#L299-L302
+export default [
+ createPrefixVisitor({
+ name: "user-select",
+ enter(path) {
+ return prefixCSSProperty({
+ path,
+ propertyName: "user-select",
+ browserFeaturesKey: "user-select-none",
+ });
+ },
+ }),
+];

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/user-select/input.css
+.style {
+ user-select: none;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/user-select/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 > user-select`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ user-select: none;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ -ms-user-select: none;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ user-select: none;
+}
+
+```

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

feat(css-prefix): user-select support (#1436)