Closed reachtrevor closed 2 days ago
Thanks for the response on a weekend @rtivital, I tried both suggestions in the article you sent an neither worked.
Since I haven't made much progress I've put the repository up on github https://github.com/reachtrevor/befe
Quick setup:
yarn
npx nx serve console
to start the React apphttp://127.0.0.1:4200/console
You'll see the sidebar and how the navigation links are scrunched up. If you look at MainNavLink.module.css
you'll see the css for them. main.tsx
is where I import everything, I already had it importing in the correct order, I change the css import to include "layer" as you will see.
It's worth noting that everything was working for about a day, then I installed and configured redux-toolkit and everything broke. I don't think it has anything to do with redux-toolkit specifically, but maybe some package got upgraded along the way.
You did not change styles to layers import. https://github.com/reachtrevor/befe/blob/main/apps/console/src/main.tsx#L2
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.14.3
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
Chrome
Describe the bug
When applying styles (specifically
padding
in this case) the class defining styles for theUnstyledButton
component somehow take precedence over a class applied via the className prop.This is confusing because they are both the same level of css specificity (just classes).
background-color
is also affected, this is probably obvious because it has a defined property & value in theUnstyledButton
class.Note!
I happen to have the same styles in another project running Mantine v7.13.2, everything there works as expected.
Recreation
CSS using Postcss with latest configuration from Vite template from Mantine documentation.
Component Definition
Result:
When replacing
UnstyledButton
withBox
it works as expectedResult:
If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
No response
Self-service