Skip to content

Commit 784a7cb

Browse files
committed
Modify options for align/justify content for closer parity with CSS
1 parent 340e944 commit 784a7cb

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

packages/core/src/components/box/boxProps.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ export type Height = SizeRange | `${SizeRange}` | "auto";
8080
*/
8181
export type AlignContent =
8282
| "start"
83-
| "end"
8483
| "center"
85-
| "between"
86-
| "around"
87-
| "evenly"
84+
| "end"
85+
| "space-between"
86+
| "space-around"
87+
| "space-evenly"
88+
| "stretch"
8889
| "normal"
89-
| "baseline"
90-
| "stretch";
90+
| "baseline";
9191

9292
/**
9393
* The range of values for `align-items`.
@@ -148,7 +148,15 @@ export type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
148148
*
149149
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content
150150
*/
151-
export type JustifyContent = "start" | "end" | "center" | "between" | "around" | "evenly" | "normal" | "stretch";
151+
export type JustifyContent =
152+
| "start"
153+
| "center"
154+
| "end"
155+
| "space-between"
156+
| "space-around"
157+
| "space-evenly"
158+
| "stretch"
159+
| "normal";
152160

153161
/**
154162
* The range of values for `justify-items`.

packages/core/src/components/box/buildStyles.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ const insetLeft = appendValue<Inset>("inset-left");
130130

131131
const alignContent = mapping<AlignContent>({
132132
start: "content-start",
133-
end: "content-end",
134133
center: "content-center",
135-
between: "content-between",
136-
around: "content-around",
137-
evenly: "content-evenly",
134+
end: "content-end",
135+
"space-between": "content-between",
136+
"space-around": "content-around",
137+
"space-evenly": "content-evenly",
138+
stretch: "content-stretch",
138139
normal: "content-normal",
139140
baseline: "content-baseline",
140-
stretch: "content-stretch",
141141
});
142142

143143
const alignItems = mapping<AlignItems>({
@@ -194,11 +194,11 @@ const flexWrap = mapping<FlexWrap>({
194194

195195
const justifyContent = mapping<JustifyContent>({
196196
start: "justify-start",
197-
end: "justify-end",
198197
center: "justify-center",
199-
between: "justify-between",
200-
around: "justify-around",
201-
evenly: "justify-evenly",
198+
end: "justify-end",
199+
"space-between": "justify-between",
200+
"space-around": "justify-around",
201+
"space-evenly": "justify-evenly",
202202
normal: "justify-normal",
203203
stretch: "justify-stretch",
204204
});

0 commit comments

Comments
 (0)