Mantine Library ClassNames conflicts with UnoCSS and TailWind "Margin" rule #5968
Closed
1 of 2 tasks
Labels
Fixed patch
Completed issues that will be published with next patch (1.0.X)
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.6.2
What package has an issue?
@mantine/core
What framework do you use?
create-react-app (CRA)
In which browsers you can reproduce the issue?
All
Describe the bug
When using Mantine alongside UnoCss sometimes (it is quite random, because of the nonce generator) it happens that the nonce generator outputs a string that is only numbers. And that is used to generate a classname on the format:
However, the tailwind and UnoCss use this prefix to indicate "margin" (e.g.:
m-5
would representmargin-left: 1rem;
)And when the nonce is only numbers, the postcss processor of UnoCss generates the relative margin class. For example
m-8983817
woudl outputmargin: 2245954.25rem;
And reading the docs it explicitly defines that this prefix cannot be changed: https://mantine.dev/theming/mantine-provider/#classnamesprefix
If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
Self-service
The text was updated successfully, but these errors were encountered: