[V7] Numeric values in slideSize
breaks Carousel due to unprocessed unitless css value
#5050
Labels
Fixed
Completed issues that will be published with next patch (1.0.X)
What package has an issue
@mantine/carousel
Describe the bug
In v6
slideSize
allowed to pass numeric or string (percentage) values, and numeric values was transformed with @emotion.Now, why slideSize still allow to pass numeric values but not transform it under the hood?
See the provided codesandbox.
What version of @mantine/* packages do you have in package.json? (Note that all @mantine/* packages must have the same version in order to work correctly)
latest
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/gracious-engelbart-plk9cs?file=/src/App.tsx
Do you know how to fix the issue
None
Are you willing to participate in fixing this issue and create a pull request with the fix
None
Possible fix
If numeric values allowed - please - transform it according to common rules - transform it inside to rem (it is assumed that this is the user's way of passing the value in pixels).
Or if you don't want to do this - disallow numeric values at all for
slideSize
prop for Carousel.Btw this is the breaking change.
Preferred to keep support for numeric values with postprocessing internally.
The text was updated successfully, but these errors were encountered: