Skip to content

Instantly share code, notes, and snippets.

@atelierbram
Forked from iegik/reset.css
Last active October 20, 2023 06:42
Show Gist options
  • Select an option

  • Save atelierbram/db3088215ead5e06ca73 to your computer and use it in GitHub Desktop.

Select an option

Save atelierbram/db3088215ead5e06ca73 to your computer and use it in GitHub Desktop.
CSS Typography reset
html, body, div, span, applet, object, iframe, table, caption,
tbody, tfoot, thead, tr, th, td, del, dfn, em, font, img, ins,
kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr,
acronym, address, big, cite, code, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend {
vertical-align: baseline;
font-family: inherit;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
outline: 0;
padding: 0;
margin: 0;
border: 0;
}
:focus {
outline: 0;
}
body {
background: white;
line-height: 1;
color: black;
}
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
font-weight: normal;
text-align: left;
}
ul, ol {list-style-type: none;}
blockquote:before, blockquote:after, q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
/* automatecly resize image to width of container */
img, object, video, embed { max-width: 100%;}
/* Numbering and bullets */
ul, ol {margin-left: 1.25em;}
li:before { margin-right: .5em;}
ul li:before { content: "❁"}
ul li li:before { content: "❀"}
ul li li li:before { content: "✿"}
ul li li li li:before { content: "❃"}
ol {counter-reset: n;}
ol li { counter-increment: n;}
ol li:before{ content: counters(n, ".") ".";}
/* "Red line" */
p:first-letter, blockquote, blockquote:before { margin-left:2.5em}
/* Word wrap http://jsfiddle.net/6uG82/4/ */
pre,p,li,td {
white-space: pre; /* CSS2 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
white-space: -moz-pre-line; /* Mozilla, since 1999 */
white-space: -pre-line; /* Opera 4-6 */
white-space: -o-pre-line; /* Opera 7 */
word-wrap: break-word; /* IE, Chrome */
}
s+sup { position:absolute; line-height:.1em;padding-bottom:3em;}
/* blockquote */
blockquote:before, blockquote:after,q:before, q:after {position:relative;}
blockquote:before, q:before { content: "❝"}
blockquote:after, q:after { content: "❞"}
blockquote:before {left:-1ex;top:1ex}
blockquote:after {right:-1ex;bottom:1ex}
blockquote address { text-align:right; padding-right: 1em}
blockquote address:before { content: "— "}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment