Skip to content

Instantly share code, notes, and snippets.

@chmln
Last active March 8, 2016 05:16
Show Gist options
  • Save chmln/000fab907fa024266710 to your computer and use it in GitHub Desktop.
Save chmln/000fab907fa024266710 to your computer and use it in GitHub Desktop.
lightweight css reset
/* =Reset
-----------------------------------------------------------------------------*/
html, body, div, span, 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,
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, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
vertical-align: baseline;
}
html, div, article, section, main, footer, header, form, fieldset, pre, code, p,
input[type="text"], input[type="tel"], input[type="email"], input[type="url"],
input[type="password"] { box-sizing: border-box; }
a:active,
a:hover {
outline: 0;
}
audio:not([controls]) {
display: none;
height: 0;
}
blockquote,
q {
quotes: none;
}
blockquote p:before,
blockquote p:after,
q:before,
q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
caption,
th,
td {
text-align: left;
vertical-align: top;
}
thead th,
thead td {
font-weight: bold;
vertical-align: bottom;
}
a img,
th img,
td img {
vertical-align: top;
}
button,
input,
select,
textarea {
margin: 0;
}
textarea {
overflow: auto;
vertical-align: top;
resize: vertical;
}
button {
width: auto;
overflow: visible;
}
input[type="reset"],
input[type="submit"],
input[type="file"],
input[type="radio"],
input[type="checkbox"],
select,
button,
a {
cursor: pointer;
}
button:active,
button:focus {
outline: none;
}
input::-moz-focus-inner,
button::-moz-focus-inner {
border: 0;
padding: 0;
}
input[type="radio"],
input[type="checkbox"] {
font-size: 110%;
position: relative;
margin-right: 3px;
padding: 0;
}
input[type="search"] {
-webkit-appearance: textfield;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
}
hr {
display: block;
box-sizing: content-box;
height: 1px;
border: 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
}
img,
video,
audio,
embed,
object {
max-width: 100%;
}
img,
video,
embed,
object {
height: auto;
}
embed,
object {
height: 100%;
}
img {
vertical-align: middle;
-ms-interpolation-mode: bicubic;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment