Skip to content

Commit 3fb9239

Browse files
authored
fix: remove size utility (#183)
1 parent f980ddb commit 3fb9239

File tree

3 files changed

+8
-110
lines changed

3 files changed

+8
-110
lines changed

packages/system/src/styles/sizing.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -70,34 +70,6 @@ export const height = style({
7070
themeGet: getSize,
7171
})
7272

73-
type SizeProp<T extends ITheme> = SystemProp<
74-
SizeGetter<T> | (CSS.Property.Width & CSS.Property.Height),
75-
T
76-
>
77-
export interface SizeProps<T extends ITheme = Theme> {
78-
size?: SizeProp<T>
79-
motionSafeSize?: SizeProp<T>
80-
motionReduceSize?: SizeProp<T>
81-
firstSize?: SizeProp<T>
82-
lastSize?: SizeProp<T>
83-
oddSize?: SizeProp<T>
84-
evenSize?: SizeProp<T>
85-
visitedSize?: SizeProp<T>
86-
checkedSize?: SizeProp<T>
87-
focusWithinSize?: SizeProp<T>
88-
hoverSize?: SizeProp<T>
89-
focusSize?: SizeProp<T>
90-
focusVisibleSize?: SizeProp<T>
91-
activeSize?: SizeProp<T>
92-
disabledSize?: SizeProp<T>
93-
placeholderSize?: SizeProp<T>
94-
}
95-
export const size = style({
96-
prop: 'size',
97-
cssProperty: ['width', 'height'],
98-
themeGet: getSize,
99-
})
100-
10173
type MaxWidthProp<T extends ITheme> = SystemProp<
10274
SizeGetter<T> | CSS.Property.MaxWidth,
10375
T
@@ -209,15 +181,13 @@ export const minHeight = style({
209181
export interface SizingProps<T extends ITheme = Theme>
210182
extends WidthProps<T>,
211183
HeightProps<T>,
212-
SizeProps<T>,
213184
MaxWidthProps<T>,
214185
MaxHeightProps<T>,
215186
MinWidthProps<T>,
216187
MinHeightProps<T> {}
217188
export const sizing = compose(
218189
width,
219190
height,
220-
size,
221191
maxWidth,
222192
maxHeight,
223193
minWidth,

website/pages/docs/getting-started/upgrade-guide.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ To reduce conflict between image attributes `width` and `height`, only `w` and `
8383

8484
Replace it by `w` and `h`.
8585

86+
### No more `size` utility
87+
88+
To reduce conflict between [input attribute `size`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-size), size .
89+
90+
- **If you use `size` in your project:**
91+
92+
Replace it by `w` + `h`.
93+
8694
### No more `forwardedAs`
8795

8896
Everything is now simplified, you don't have to worry about `forwardedAs` any more, `as` works everywhere.

website/pages/docs/sizing/size.mdx

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)