Skip to content

Commit

Permalink
fix: flex basis tokens (#2855)
Browse files Browse the repository at this point in the history
fix: use sizes tokens for flexBasis instead of spacing
  • Loading branch information
adbutterfield authored Sep 9, 2024
1 parent 9e9ce9d commit b7ed157
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/clever-suns-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@pandacss/preset-base': patch
'@pandacss/generator': patch
---

fix: use sizing tokens for flexBasis instead of spacing tokens
2 changes: 1 addition & 1 deletion packages/generator/__tests__/generate-prop-types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('generate property types', () => {
float: "start" | "end" | CssProperties["float"];
hideFrom: Tokens["breakpoints"];
hideBelow: Tokens["breakpoints"];
flexBasis: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "full";
flexBasis: Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "full";
flex: "1" | "auto" | "initial" | "none";
gridTemplateColumns: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
gridTemplateRows: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-base/src/utilities/flex-and-grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const flexGrid: UtilityConfig = {
group: 'Flex Layout',
values(theme) {
return {
...theme('spacing'),
...theme('sizes'),
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
Expand Down
2 changes: 1 addition & 1 deletion packages/studio/styled-system/types/prop-type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface UtilityValues {
float: "start" | "end" | CssProperties["float"];
hideFrom: Tokens["breakpoints"];
hideBelow: Tokens["breakpoints"];
flexBasis: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "full";
flexBasis: Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "full";
flex: "1" | "auto" | "initial" | "none";
gridTemplateColumns: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
gridTemplateRows: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
Expand Down

0 comments on commit b7ed157

Please sign in to comment.