Adding a CSS Reset

This project setup uses PostCSS Normalize for adding a CSS Reset.

To start using it, add @import-normalize; anywhere in your CSS file(s). You only need to include it once and duplicate imports are automatically removed. Since you only need to include it once, a good place to add it is index.css or App.css.

index.css

  1. @import-normalize; /* bring in normalize.css styles */
  2. /* rest of app styles */

You can control which parts of normalize.css to use via your project's browserslist.

Results when browserslist is last 3 versions:

  1. /**
  2. * Add the correct display in IE 9-.
  3. */
  4. audio,
  5. video {
  6. display: inline-block;
  7. }
  8. /**
  9. * Remove the border on images inside links in IE 10-.
  10. */
  11. img {
  12. border-style: none;
  13. }

Results when browserslist is last 2 versions:

  1. /**
  2. * Remove the border on images inside links in IE 10-.
  3. */
  4. img {
  5. border-style: none;
  6. }

Browser support

Browser support is dictated by what normalize.css supports. As of this writing, it includes:

  • Chrome (last 3)
  • Edge (last 3)
  • Firefox (last 3)
  • Firefox ESR
  • Opera (last 3)
  • Safari (last 3)
  • iOS Safari (last 2)
  • Internet Explorer 9+