feat(css-prefix): text-overflow, appearance and writing-mode support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:0ed7a412acb9745694bd9288b8560b676a685fae,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:11c4f4d54e6311af362fec292ee5bffe5ebf04df,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";
@@ -9,12 +10,15 @@ import hyphens from "./prefixes/hyphens";
import multicolumn from "./prefixes/multicolumn";
import position from "./prefixes/position";
import textOrientation from "./prefixes/text-orientation";
+import textOverflow from "./prefixes/text-overflow";
import transform from "./prefixes/transform";
import transition from "./prefixes/transition";
import userSelect from "./prefixes/user-select";
+import writingMode from "./prefixes/writing-mode";
export default [
...animation,
+ ...appearance,
...backdropFilter,
...borderRadius,
...boxShadow,
@@ -24,8 +28,10 @@ export default [
...multicolumn,
...position,
...textOrientation,
+ ...textOverflow,
...transform,
...transition,
...userSelect,
+ ...writingMode,
];
/* GENERATED:END(id:main) */

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

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

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

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

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

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/text-overflow/input.css
+.style {
+ text-overflow: hidden;
+}
+
+.style {
+ text-overflow: scroll;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/text-overflow/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 > text-overflow`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ text-overflow: hidden;
+}
+
+.style {
+ text-overflow: scroll;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ -o-text-overflow: hidden;
+ text-overflow: hidden;
+}
+
+.style {
+ -o-text-overflow: scroll;
+ text-overflow: scroll;
+}
+
+```

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/writing-mode/input.css
+.style {
+ writing-mode: horizontal-tb;
+}
+
+.style {
+ writing-mode: vertical-lr;
+}
\ No newline at end of file

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/writing-mode/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 > writing-mode`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ writing-mode: horizontal-tb;
+}
+
+.style {
+ writing-mode: vertical-lr;
+}
+```
+
+### `Output`
+
+```css
+.style {
+ -webkit-writing-mode: horizontal-tb;
+ writing-mode: horizontal-tb;
+}
+
+.style {
+ -webkit-writing-mode: vertical-lr;
+ writing-mode: vertical-lr;
+}
+
+```

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

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

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

feat(css-prefix): text-overflow, appearance and writing-mode support (#1461)