feat(css-prefix): box-sizing support
MODIFY
internal/compiler/transforms/compile/css-handler/prefix/index.ts
internal/compiler/transforms/compile/css-handler/prefix/index.ts
-/* GENERATED:START(hash:4f8c2ede77e692d6fd4683434eb8dc3722d74c95,id:main) Everything below is automatically generated. DO NOT MODIFY. Run `./rome run scripts/generated-files/css-prefix` to update. */
+/* GENERATED:START(hash:1aabffb97172175117d41244d986f4c798f73010,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 boxSizing from "./prefixes/box-sizing";
import display from "./prefixes/display";
import multicolumn from "./prefixes/multicolumn";
import position from "./prefixes/position";
@@ -8,6 +9,7 @@ import transition from "./prefixes/transition";
export default [
...boxShadow,
+ ...boxSizing,
...display,
...multicolumn,
...position,

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

ADD
internal/compiler/transforms/compile/test-fixtures/css-handler/prefix/box-sizing/input.css
+.style {
+ text-align: center;
+ box-sizing: content-box;
+}
+
+.style {
+ box-sizing: content-box;
+}
+
+.style {
+ text-align: center;
+ box-sizing: content-box;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+}
+
+.style {
+ text-align: center;
+ box-sizing: border-box;
+}
+
+.style {
+ box-sizing: border-box;
+}
+
+.style {
+ text-align: center;
+ box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+}

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

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

feat(css-prefix): box-sizing support (#1431)