I just finished a biggish project at work and wanted to get out some thoughts.  This is one of my firsts using a new front-end template and my impressions of it are mixed at best.  If there is one thing that I took away it is this. I hate css resets. And here is why. 

Most people when they tell me why they like resets say things like, “Well it minimizes the browser differences for font sizes and elements like headers (h1, h2, etc) and spacing for things like list items”  So lets look at those two complaints one at a time.  

1. Font sizes.  There is a rational out there that every browser in every platform should look exactly the same. I think this comes from the early days of the web when print designers couldn’t cope with inconsistency. I think that is a terrible goal and has help back our industry.  Think about it, most people out of the internet industry don’t even have two browsers let alone use more than one. So who exactly benefits by having each the font sizes of each browser+OS combination pixel perfect?  Just the designer and PM. I suggest we embrace the nuances of each browser rather than just trying to minimizes them. 

2. Bad Box Model. Another reason I commonly hear is that resets are good for fixing spacing difference between box model implementations.  When I hear this I usually wait and listen and a good developer will rattle of all of the problem elements that they know of generally, list items, headers, form elements, etc.  At this point I wonder, if you know what elements have the potential to cause problems, isn’t that case closed?  I can see where a junior developer not knowing each browsers short comings might benefit from a complete reset, but wouldn’t it be better to teach that person what they are?  The concept reminds me a lot of using a javascript library without know what the library is doing. So if you know what the problem areas are, is it really worth applying a complete reset to every markup element, just for a few bad apples?

3. Bad programming. Every programmer knows that less code, more often that not, is better code.  Perhaps it is because many of us came from design related paths, but it just plain doesn’t make any sense to me to tear write code to remove all formatting, then re-write it to add much of it back.   The redundant processing is a waste of time and cycles. 

If you are in love with css resets, have at it. There are loads of ways to built a web site, but using a reset is just a waste of time. And I’m not the only hater out there

Leave a Reply