This is a old reset css looks like:
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-style: normal;
font-weight: normal;
font-size: 100%;
vertical-align: baseline;
}
Or worse:
* {
margin: 0;
padding: 0;
border: 0;
font-style: normal;
font-weight: normal;
font-size: 16px;
vertical-align: baseline;
}
These are totally destructive methods. And the result is terrible. We need a better way.
.h1 {
margin: 0;
font-size: 1em;
font-weight: inherit;
}
It's Non-destructive. You can opt-in or out of a per-element basis.
<h1 class="h1">
<h1>
There's a Jade mixin for that.
mixin h1
h1.h1&attributes(attributes)
block
You can call it like this:
+body
+h1 Title here
+p Easy right?
- Download
- Bower:
$ bower install nondestructive-reset.css
$ git clone https://github.com/BYODKM/nondestructive-reset.css.git
$ cd nondestructive-reset.css
$ npm install
$ grunt
Use this reset.css with normalize.css and should normalize first.
- IE 9+
- Others
MIT