Tuesday, March 22, 2022

CSS Resets

Start using CSS resets for personal projects. A good one is made by a guy at work called Marx. To use it in a project:

  1. Copy this and paste it into your project in a styles directory
  2. Import the reset into an index.css or load in onto every page
@import url('./styles/marx.min.css');
  1. Customize as you see fit, a good starter is to give the body these rules
body {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}
  1. You should wrap all form inputs in a div with some margin top and bottom
.input-block {
  margin: 20px 0px;
}
  1. Reset variables if you want to mess around with colors
  2. Reset theme color to white
<meta name="theme-color" content="#fff" />