Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V7] Numeric values in slideSize breaks Carousel due to unprocessed unitless css value #5050

Closed
7iomka opened this issue Oct 16, 2023 · 1 comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@7iomka
Copy link
Contributor

7iomka commented Oct 16, 2023

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.

@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Oct 22, 2023
@rtivital
Copy link
Member

Fixed in 7.1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants