feat(css): box-shadow support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:5fb179e874f73fc64e32026cfd46a65fd59630e1,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:ab4c465879394d13c1468b7726e27aa2da974b57,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 transform from "./prefixes/transform";
import transition from "./prefixes/transition";
-export default [...display, ...transform, ...transition];
+export default [...boxShadow, ...display, ...transform, ...transition];
/* GENERATED:END(id:main) */

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

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/box-shadow/input.css
+.style {
+ text-align: center;
+ box-shadow: 10px 5px 5px red;
+ align-content: center;
+}
+
+.style {
+ box-shadow: 10px 5px 5px red;
+}
+
+.style {
+ text-align: center;
+ box-shadow: 10px 5px 5px red;
+ -moz-box-shadow: 10px 5px 5px red;
+ -webkit-box-shadow: 10px 5px 5px red;
+ align-content: center;
+}

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/box-shadow/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 > box-shadow`
+
+### `Diagnostics`
+
+```
+
+```
+
+### `Input`
+
+```css
+.style {
+ text-align: center;
+ box-shadow: 10px 5px 5px red;
+ align-content: center;
+}
+
+.style {
+ box-shadow: 10px 5px 5px red;
+}
+
+.style {
+ text-align: center;
+ box-shadow: 10px 5px 5px red;
+ -moz-box-shadow: 10px 5px 5px red;
+ -webkit-box-shadow: 10px 5px 5px red;
+ align-content: center;
+}
+
+```
+
+### `Output`
+
+```css
+.style {
+ text-align: center;
+ -moz-box-shadow: 10px 5px 5px red;
+ -webkit-box-shadow: 10px 5px 5px red;
+ box-shadow: 10px 5px 5px red;
+ align-content: center;
+}
+
+.style {
+ -moz-box-shadow: 10px 5px 5px red;
+ -webkit-box-shadow: 10px 5px 5px red;
+ box-shadow: 10px 5px 5px red;
+}
+
+.style {
+ text-align: center;
+ box-shadow: 10px 5px 5px red;
+ -moz-box-shadow: 10px 5px 5px red;
+ -webkit-box-shadow: 10px 5px 5px red;
+ align-content: center;
+}
+
+```

feat(css): box-shadow support (#1426)