Skip to content

Instantly share code, notes, and snippets.

@outring
Last active May 31, 2019 12:49
Show Gist options
  • Save outring/931b61e99c50fabde470 to your computer and use it in GitHub Desktop.
Save outring/931b61e99c50fabde470 to your computer and use it in GitHub Desktop.
Selective reset
dd, dl, dt, form, li, p {
margin: 0;
padding: 0;
}
img, table {
margin: 0;
padding: 0;
border: 0;
}
tr {
vertical-align: baseline;
}
button, input, select, textarea {
margin: 0;
padding: 0;
outline: 0;
}
textarea {
overflow: auto;
resize: none;
}
optgroup, strong, th {
font-style: inherit;
font-weight: inherit;
}
u {
text-decoration: none;
}
small {
font-size: 100%;
}
ol, ul {
margin: 0;
padding: 0;
list-style: none;
}
td, th {
margin: 0;
padding: 0;
border: 0;
text-align: left;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
font-size: 100%;
font-style: inherit;
font-weight: inherit;
}
sup {
position: relative;
top: -0.5em;
vertical-align: baseline;
}
sub {
bottom: -0.5em;
position: relative;
vertical-align: baseline;
}
/** @see http://dimox.name/input-submit-vertical-align-in-firefox/ */
input::-moz-focus-inner {
border: none;
padding: 0;
}
body {
margin: 0;
padding: 0;
line-height: 1;
}
/** @for IE10*/
input::-ms-clear {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment