Freaks version of Eric Meyer reset stylesheet
First appeared on mobifreaks.com · Updated
For about a year we had used Eric Meyer's reset stylesheet on Mobifreaks. Before every project we added the same handful of helper classes, so we built our own version with them included.
/* Eric Meyer Reset (public domain) + Mobifreaks additions */
html, body, div, span, applet, 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, center, 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, ruby, section, summary, time, mark, audio, video {
margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }
table { border-collapse: collapse; border-spacing: 0; }
/* Additions */
a { text-decoration: none; }
.txt-rt { text-align: right; }
.txt-lt { text-align: left; }
.txt-center { text-align: center; }
.float-rt { float: right; }
.float-lt { float: left; }
.clearFloat { clear: both; }
.pos-relative { position: relative; }
.pos-absolute { position: absolute; }
Looking back from 2026
- The HTML5
display: blockline was for browsers that didn't know the new elements yet. Every current browser does, so it can go. a { text-decoration: none; }removed underlines from every link, including links in body text. People rely on underlines to spot links, so I now keep them in content and only remove them in navigation.ol, ul { list-style: none; }has a side effect: Safari stops announcing styled lists as lists to VoiceOver. Addrole="list"to lists that need to stay lists.- The helper classes were an early version of what utility frameworks like Tailwind do today, and floats have been replaced by flexbox and grid for layout.
A month later I combined this with Normalize.css in Freaks reset stylesheet, and in 2023 I wrote about what a reset should do today in Demystifying CSS Resets.