You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a theme with custom breakpoints, and set the breakpoint unit to "rem" . Define the sm breakpoint as 22.5.
With the new theme, use the maxWidth prop with value "sm" on any component that support it, e.g. Typography or Box
Examine the end result and the rendered styles.
Current behavior 馃槸
The max-width style is rendered incorrectly with hardcoded px width instead of rem.
E.g. max-width: 22.5px
Expected behavior 馃
The max-width style should use the actual rem value from the theme:
E.g. max-width: 22.5rem
Context 馃敠
We are trying to convert our MUI-based component library to rem breakpoints so that our components can better support text scaling (required for accessibility compliance and for good UX).
However, this issue is stopping us from being able to go through with the change since the maxWidth prop is used quite extensively by our component consumers.
Your environment 馃寧
npx @mui/envinfo
Tested latest version via CodeSandBox using Chrome and Safari.
The text was updated successfully, but these errors were encountered:
Duplicates
Latest version
Steps to reproduce 馃暪
Link to live example: https://codesandbox.io/s/pedantic-currying-28qrhq?file=/Demo.tsx
Steps:
"rem"
. Define the sm breakpoint as22.5
.maxWidth
prop with value "sm" on any component that support it, e.g. Typography or BoxCurrent behavior 馃槸
The max-width style is rendered incorrectly with hardcoded
px
width instead ofrem
.E.g.
max-width: 22.5px
Expected behavior 馃
The max-width style should use the actual rem value from the theme:
E.g.
max-width: 22.5rem
Context 馃敠
We are trying to convert our MUI-based component library to rem breakpoints so that our components can better support text scaling (required for accessibility compliance and for good UX).
However, this issue is stopping us from being able to go through with the change since the
maxWidth
prop is used quite extensively by our component consumers.Your environment 馃寧
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: