HTML5 CSS Reset
I have been a regular user of the CSS reset by meyerweb, an alternative to the universal reset – at the cost of a few extra lines. More as an experiment I did an updated version for HTML5 which you can find below. The purpose of a reset is to remove any browser-centric default CSS when making a theme, this reduces the chances of having slightly differing styles cross-browser – because they do use their own custom formatting.
Anyway, it remains mostly unchanged – I just included some of the new elements of HTML5 which may in the near future be problematic. Click beyond the jump to see the code.
/* Edited for HTML5 Compliance */
html, body, div, span, applet, object, iframe, header, section,
hgroup, h1, h2, h3, h4, h5, h6, p, blockquote, pre, detail, summary,
a, abbr, acronym, address, article, aside, audio, big, canvas, cite, code,
del, dfn, em, embed, img, ins, kbd, menu, nav, q, samp, source, video,
mark, meter, small, strong, sub, sup, var, time,
b, u, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, output, progress {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
/* remember to highlight inserts somehow! */
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}


No Comments
Be the first to comment!