feat(css-prefix): tab-size and scroll-snap-type support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:cef7f5f2736247ed31692e797c3e63f9ef6c20be,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:9d2f97abaad6ed5af257118f6a0f51bd0305122f,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";
@@ -12,6 +12,8 @@ import hyphens from "./prefixes/hyphens";
import imageSet from "./prefixes/image-set";
import multicolumn from "./prefixes/multicolumn";
import position from "./prefixes/position";
+import scrollSnapType from "./prefixes/scroll-snap-type";
+import tabSize from "./prefixes/tab-size";
import textOrientation from "./prefixes/text-orientation";
import textOverflow from "./prefixes/text-overflow";
import transform from "./prefixes/transform";
@@ -33,6 +35,8 @@ export default [
...imageSet,
...multicolumn,
...position,
+ ...scrollSnapType,
+ ...tabSize,
...textOrientation,
...textOverflow,
...transform,

ADD
internal/compiler/transforms/compile/css-handler/prefix/prefixes/scroll-snap-type.ts
+import {
+ createPrefixVisitor,
+ prefixCSSProperty,
+} from "@internal/compiler/transforms/compile/css-handler/prefix/utils";
+
+export default [
+ createPrefixVisitor({
+ name: "scroll-snap-type",
+ enter(path) {
+ return prefixCSSProperty({
+ path,
+ propertyName: "scroll-snap-type",
+ browserFeaturesKey: "css-snappoints",
+ });
+ },
+ }),
+];

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

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/scroll-snap-type/input.css
+.style {
+ scroll-snap-type: x mandatory;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/scroll-snap-type/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 > scroll-snap-type`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ scroll-snap-type: x mandatory;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ -ms-scroll-snap-type: x mandatory;
+ -webkit-scroll-snap-type: x mandatory;
+ scroll-snap-type: x mandatory;
+}
+
+```

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/tab-size/input.css
+.style {
+ tab-size: 4;
+}
+
+
+.style {
+ tab-size: 10px;
+}
+
+.style {
+ tab-size: inherit;
+}
\ No newline at end of file

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/tab-size/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 > tab-size`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ tab-size: 4;
+}
+
+
+.style {
+ tab-size: 10px;
+}
+
+.style {
+ tab-size: inherit;
+}
+```
+
+### `Output`
+
+```css
+.style {
+ -moz-tab-size: 4;
+ -o-tab-size: 4;
+ tab-size: 4;
+}
+
+.style {
+ -moz-tab-size: 10px;
+ -o-tab-size: 10px;
+ tab-size: 10px;
+}
+
+.style {
+ -moz-tab-size: inherit;
+ -o-tab-size: inherit;
+ tab-size: inherit;
+}
+
+```

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

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

feat(css-prefix): tab-size and scroll-snap-type support (#1476)