CSS resets, normalizations, opinions

CSS resets are, in general, a bad idea. They are designed to ensure that your page looks the same to absolutely everyone on every browser, but that’s very often overkill. For example, here is YUI’s reset.css (14 rules). It’s like saying to most of HTML, “I don’t need you or want you.”

CSS normalizers are better. They try to bring all browsers to a baseline. For example, here is Necolas’s normalize.css (40 rules). It’s less drastic, but still disincentivizes browser makers to abide by the standards.

But for simple projects, you probably don’t need all that. But I do find myself writing and rewriting a few CSS idioms throughout my web projects. Here’s the LESS:

body { margin: 0; }
code { font-family: monospace; }
input, select, textarea, button { box-sizing: border-box; }
table {
  border-collapse: collapse;
  th, td {
    font-size: 100%;
    text-align: left;
  }
}
/* and some typical class modifications */
table.fill { width: 100%; }
.nowrap { white-space: nowrap; }