Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

jasonkarns/css-reset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

CSS Reset

Essentially Eric Meyer's reset, I've made a few tweaks that make his reset more palatable to my tastes. I've also blogged about this project.

Changes

:focus { outline:none; }

The only rule of Meyer's reset that I consider actually harmful to the end user experience, the original rule disabled the browser default dotted outline on focused items. Removing the default outline makes keyboard navigation almost impossible. Meyer even notes in the comments that developers should remember to override the rule with custom styles for focused items. But who actually does that? Patrick Lauke found a method for alleviating the most annoying parts of the focus outline: http://24ways.org/2009/dont-lose-your-focus

font-size: 100%;

While this rule doesn't affect the end user all that much, the rule's selector matches almost every element. Additionally, the font-size property is inherited. This means the property is both inherited and directly applied to nearly every element in your HTML. For ardent Firebug users, this renders the style pane almost 99% noise as the same rule is inherited and then overridden at every level of the DOM tree. No thanks.

Questionable

I haven't yet removed these items from the reset but I seriously question their utility. Among the following rules, think back to how often they would have actually been helpful on your projects. Not that often?

  1. border:0; – on anything besides img, abbr, acronym?
  2. outline:0; – what has outline by default?
  3. vertical-align: baseline; – isn't that already the default?
  4. background: transparent; – isn't that already the default?
  5. blockquote, q {quotes:none;}blockquote doesn't get quotation marks by default, and who actually uses q? If you ask me, quotation marks are just like punctuation—they should be part of the content, not the markup.
  6. ins and del – I think the default style is fine. If not, it would get overridden by my main design anyway.

About

Customization of Eric Meyer's CSS Reset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages