Skip to content

Commit

Permalink
fix: allow passing in inherited float values (#2552)
Browse files Browse the repository at this point in the history
* fix: allow passing in inherited float values

* docs: add changeset

---------

Co-authored-by: Segun Adebayo <[email protected]>
  • Loading branch information
Jonas-C and segunadebayo authored May 1, 2024
1 parent 33cf5bd commit 2116abe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changeset/fresh-eggs-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@pandacss/generator": patch
"@pandacss/preset-base": patch
"@pandacss/studio": patch
---

Fix issue where `float` property did not allow inherited values (auto, initial, none, etc.)
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 @@ -22,7 +22,7 @@ describe('generate property types', () => {
insetInlineStart: Tokens["spacing"];
right: Tokens["spacing"];
bottom: Tokens["spacing"];
float: "left" | "right" | "start" | "end";
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";
Expand Down
3 changes: 2 additions & 1 deletion packages/preset-base/src/utilities/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ export const layout: UtilityConfig = {
},
float: {
className: 'float',
values: ['left', 'right', 'start', 'end'],
values: ['start', 'end'],
property: 'float',
group: 'Position',
transform(value) {
if (value === 'start') {
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 @@ -16,7 +16,7 @@ export interface UtilityValues {
insetInlineStart: Tokens["spacing"];
right: Tokens["spacing"];
bottom: Tokens["spacing"];
float: "left" | "right" | "start" | "end";
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";
Expand Down

0 comments on commit 2116abe

Please sign in to comment.