Coder Social home page Coder Social logo

css-reset-1's Introduction

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.

Feedback

I'd love any feedback on this. Add your comments on the wiki or my blog post on this subject.

css-reset-1's People

Contributors

jasonkarns avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.