-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Open
Labels
Milestone
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
https://mui.com/system/sizing/
<Box sx={{ width: 1 }} />
feels a bit like a foot gun. I would expect 1px
, not 100%
. This discussion started in https://github.com/mui/mui-x/pull/5177/files#r895041464.
Examples 🌈
I would propose:
diff --git a/packages/mui-system/src/sizing.js b/packages/mui-system/src/sizing.js
index 0454dfb170..c6c8920e49 100644
--- a/packages/mui-system/src/sizing.js
+++ b/packages/mui-system/src/sizing.js
@@ -3,7 +3,7 @@ import compose from './compose';
import { handleBreakpoints, values as breakpointsValues } from './breakpoints';
export function sizingTransform(value) {
- return value <= 1 && value !== 0 ? `${value * 100}%` : value;
+ return value < 1 && value > 1 ? `${value * 100}%` : value;
}
export const width = style({
Motivation 🔦
No response