minireset.css is a tiny modern CSS reset that covers the basics:
- resets the font sizes
- resets the block margins
- preserves the inline margins
- sets the border-box box sizing
- sets responsive media elements
- resets tables
so that using semantic markup doesn’t affect the styling
so that the spacing is only applied when you need it
so that buttons and inputs keep their default layout
so that borders and paddings don’t affect the set dimensions
so that images and embeds scale with the browser width
so that tabular data only takes the space it needs
/*! minireset.css v0.0.2 | MIT License | github.com/jgthms/minireset.css */
html, body, p,
ol, ul, li,
dl, dt, dd,
blockquote, figure,
fieldset, legend, textarea,
pre, iframe, hr,
h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%;
font-weight: normal;
}
ul {
list-style: none;
}
button, input, select, textarea {
margin: 0;
}
html {
box-sizing: border-box;
}
* {
box-sizing: inherit;
}
*:before, *:after {
box-sizing: inherit;
}
img, embed, object, audio, video {
height: auto;
max-width: 100%;
}
iframe {
border: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td, th {
padding: 0;
text-align: left;
}
credit source: minireset