feat(css-prefix): position support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:207880f3cf6129db542f8b275dc5fff46852b444,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:4f8c2ede77e692d6fd4683434eb8dc3722d74c95,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
import boxShadow from "./prefixes/box-shadow";
import display from "./prefixes/display";
import multicolumn from "./prefixes/multicolumn";
+import position from "./prefixes/position";
import transform from "./prefixes/transform";
import transition from "./prefixes/transition";
@@ -9,6 +10,7 @@ export default [
...boxShadow,
...display,
...multicolumn,
+ ...position,
...transform,
...transition,
];

ADD
internal/compiler/transforms/compile/css-handler/prefix/prefixes/position.ts
+import {
+ createPrefixVisitor,
+ prefixCSSValue,
+} from "@internal/compiler/transforms/compile/css-handler/prefix/utils";
+
+// https://github.com/Fyrd/caniuse/blob/main/features-json/css-sticky.json
+export default [
+ createPrefixVisitor({
+ name: "position/sticky",
+ enter(path) {
+ return prefixCSSValue({
+ path,
+ propertyName: "position",
+ value: "sticky",
+ browserFeaturesKey: "css-sticky",
+ });
+ },
+ }),
+];

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/position/input.css
+.style {
+ text-align: center;
+ position: sticky;
+}
+
+.style {
+ position: sticky;
+}
+
+.style {
+ text-align: center;
+ position: sticky;
+ position: -webkit-sticky;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/position/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 > position`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ text-align: center;
+ position: sticky;
+}
+
+.style {
+ position: sticky;
+}
+
+.style {
+ text-align: center;
+ position: sticky;
+ position: -webkit-sticky;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ text-align: center;
+ position: -webkit-sticky;
+ position: sticky;
+}
+
+.style {
+ position: -webkit-sticky;
+ position: sticky;
+}
+
+.style {
+ text-align: center;
+ position: sticky;
+ position: -webkit-sticky;
+}
+
+```

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

feat(css-prefix): position support (#1429)