- Install normalize.css via npm
npm install --save normalize.css
1.1 Or yarn
yarn add normalize.css
- Import it to your root
.js
file before yourcss
styles
import 'normalize.css';
npm install --save normalize.css
1.1 Or yarn
yarn add normalize.css
.js
file before your css
stylesimport 'normalize.css';
It doesn't work, Ant design styles is above normalize.css
Just import this inside the index.css:
@import-normalize;
I got this error when using above code in index.css
Unknown at rule @import-normalize css(unknownAtRules)
I also have the same IDE error but it does work for me at least.
When I inspect an element in the Dev tools it detects and applies the normalization
Just import this inside the index.css:
@import-normalize;
I got this error when using above code in index.css
Unknown at rule @import-normalize css(unknownAtRules)
Tip: If you see an "Unknown at rule @import-normalize css(unknownAtRules)" warning in VSCode, change the css.lint.unknownAtRules setting to ignore
Directly from https://create-react-app.dev/docs/adding-css-reset
use @import "normalize.css/normalize.css" instead @import-normalize;
Thanks
i write @import-normalize; but not worked!