-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Wrong theme.shape.borderRadius
definition in d.ts
#35156
Comments
I would like to work on this one. |
theme.shape.borderRadius
definition in d.ts
@totszwai The type definition you are pointing out is for As stated in the docs, if the
Okay, this is something that we have to check about it evaluating |
Agree with @ZeeshanTamboli, the migration docs refers to the sx prop, not the theme input. |
@siriwatknp but it was the breaking change, we had string value We don't want to use My point is that, Mui should not impose @ZeeshanTamboli If what I pointed out is wrong, then please point me out to the correct definition that |
@ZeeshanTamboli I am just following the import definitions, provided by Mui, from VCode. As mentioned before, we were using |
The migration doc above is for sx prop which accepts Can you provide a CodeSandbox how the |
@totszwai Thanks for the feedback. To make it supports the string, I think we will need to think about // theme
{
shape: { borderRadius: '2px' },
}
// the sx should transform using CSS calc instead
sx: { borderRadius: 3 }, // borderRadius: calc(2px * 3); Until it is possible, you will have to continue with your workaround. |
@siriwatknp I'm sorry, I was mistaken, my workaround actually didn't work, I mean while it cancels out the compilation error, it doesn't look like the settings were applied. @ZeeshanTamboli here is the sandbox and is not from v4 either, it used to work just fine in version 5.7. https://codesandbox.io/s/rem-used-to-work-in-5-7-je5em1?file=/demo.tsx I also found another problem is that, the "system's setting" is overriding the settings we have at root level, for example, I had ButtonBase's |
@totszwai Thanks for the reproduction. As said before, we had to support multiplication with the Until then, please use
Is this related to this issue? If not, please open a new issue with a reproduction. |
Hi,
By doing so, if one needs the raw multiplication, he use the number. |
Duplicates
Latest version
Steps to reproduce 馃暪
Link to live example:
Steps:
Current behavior 馃槸
According to the MUI v5 migration documentation,
borderRadius
is supposed to be able to takenumber
orstring
.https://mui.com/material-ui/migration/v5-component-changes/#%E2%9C%85-update-borderradius-prop-value
However, the definition provided by the latest Mui only takes
number
.Expected behavior 馃
Expect
shape.borderRadius
to takestring
.Note: It should accept also
123rem
and not just pixelContext 馃敠
No response
Your environment 馃寧
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: