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
I have verified that I use latest version of all @mantine/* packages
What version of @mantine/* packages do you have in package.json?
7.7.2
What package has an issue?
@mantine/core
What framework do you use?
Other, I will specify in the bug description
In which browsers you can reproduce the issue?
All
Describe the bug
I don't think it's intended behvaior
but an empty string for something like mt in the style props leads to the output marginTop: calc(0px * (...))
I would expect an empty string to be treated like undefined
(Similar to how it is in react, and css generally)
If possible, include a link to a codesandbox with a minimal reproduction
(set mt="" on any component and inspect the element)
Possible fix
in createConverter
this line is true for empty strings
There's also a corollary of this, that if you have extra spaces in your prop, then you get weird things in the output e.g. mt=" 4px" calc(0rem * var(--mantine-scale)) calc(0.25rem * var(--mantine-scale))
The str.split.join function in the same place could be a bit cleverer
(getting blocks of non-space characters, rather than splitting on spaces)
Self-service
I would be willing to implement a fix for this issue
The text was updated successfully, but these errors were encountered:
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.7.2
What package has an issue?
@mantine/core
What framework do you use?
Other, I will specify in the bug description
In which browsers you can reproduce the issue?
All
Describe the bug
I don't think it's intended behvaior
but an empty string for something like
mt
in the style props leads to the outputmarginTop: calc(0px * (...))
I would expect an empty string to be treated like undefined
(Similar to how it is in react, and css generally)
If possible, include a link to a codesandbox with a minimal reproduction
(set mt="" on any component and inspect the element)
Possible fix
in
createConverter
this line is true for empty strings
so we should explicitly check for empty string
There's also a corollary of this, that if you have extra spaces in your prop, then you get weird things in the output e.g.
mt=" 4px"
calc(0rem * var(--mantine-scale)) calc(0.25rem * var(--mantine-scale))
The str.split.join function in the same place could be a bit cleverer
(getting blocks of non-space characters, rather than splitting on spaces)
Self-service
The text was updated successfully, but these errors were encountered: