Are CSS Resets Required Anymore?

I'm rebuilding my own site and one of the first things I remember doing from 5 years back is the inclusion of a CSS reset to get the standard formatting correct between browsers.

This may no longer be needed it seems.

First a bit of history

When I last built websites in 2014 and before, CSS Resets where prevalent because browsers of the day didn't necessarily follow the same rules. They would take the HTML specification and apply their own interpreted specification which inevitably led to differences which led to the same element looking different on different browsers.

When I first started building websites in the 90's, there were two large browsers (and several smaller ones). Netscape Navigator was strict in it's parsing of the specification and if your code wasn't correct, it would break. Internet Explorer (version 5 I think) on the other hand was a lot more relaxed. It would take your code, and parse it, regardless of broken code, malformed tags etc. which would often result in inconsistent behaviour.

It led to a lot of developers building their sites for Internet Explorer (including me!) because it was easier and less stressful to get a site working OK in Internet Explorer. The Lazy way?

But that isn't the way the web should work.

The Web Standards project came about for this very reason. To advocate for a standard baseline for making websites which all browser makes should adhere to. The Web Standard Project put it a lot more eloquently

"Though leading browser makers have been involved in the creation of web standards since W3C was formed, for many years compliance was observed in the breach. By releasing browsers that failed to uniformly support standards, manufacturers needlessly fragmented the Web, injuring designers, developers, users, and businesses alike.

Lack of uniform support for key W3C standards left consumers frustrated: when using the “wrong” browser, many could not view content or perform desired transactions. Among those most frequently hurt were people with disabilities or special needs."

So Browser makes started making their software support more uniform standards which was great moving forward, but a lot of people still used the old software on old machines.

But Browser makes still preserved their default presentation methods.

Enter CSS Resets

I first read about CSS resets from Eric Meyer. His post, Reset Reasoning back in 2007 explains the need for CSS resets and why we should use them to level the playing field in terms of presentation. This way, developers weren't building in additional code or classes for specific browsers to lose a bit of margin, or add in padding so designs appear similar across devices & browsers.

Back to 2020

As I approached the styling section of the redevelopment of my own site, I posted on twitter about modern practices in terms of the CSS Reset.

It would appear that modern browsers are now pretty consistent across their presentation defaults which is great news.

So no CSS Resets needed?

Well that entirely depends on the project and developer right?

I read Andy's post on the modern CSS Reset with great interest. A reset isn't needed because browser makes default styles are consistent, but they're not perfect and there's still some global tweaks that can be added to improve that baseline style.

Maybe a CSS Reset isn't the right term for this, but more of a CSS Refine. I would thoroughly recommend reviewing Andy's personal reset and have a look at what he does to the default style to improve accessibility, personal preference and additional tweaking of styles to improve flow and readability. There's some great bits of code in here that I want to explore more soon.