I created an application in React using ant design library. In my CSS file, I added some base styles:
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
I expect that these styles should override all styles, but they don't override antd styles. Inspecting the p tag in the console I noticed that these styles:
{
margin-top: 0;
margin-bottom: 1em;
} /// comes from antd.css
overide my previous styles. How to fix this (to make my styles to override all styles) without using !important?
demo: https://codesandbox.io/s/antd-create-react-app-forked-0vs14?file=/index.js:315-811
p { box-sizing: border-box; margin: 0; padding: 0; }