Still No CSS Reset

Happy New Year ya’ll! While we’re all thinking about taking the opportunity to do various resets on our lives, I’ll take the opportunity to mention CSS resets.

As a CSS nerd, I love looking at people’s different takes on what a modern CSS reset could or should be, like I did recently. But that doesn’t really mean that I advocate for their use. I actually think having a dedicated CSS file that you bundle up for the sole purpose of “resetting” isn’t necessary anymore. Instead you just… apply styles. That styling is what ends up smoothing over what little browser differences remain, and if they don’t, well, add more. That way all your styles are together for an element are all together where I’d argue they should be.

(That’s what Jonathan Snook thinks, too.)

Adding the styles when I need them has helped keep my files smaller and easier to inspect.

To expand on that last point, one of my frustrations with using the browser inspector tools over the years has been seeing CSS resets add a lot of unnecessary clutter, showing struck-out property after struck-out property while I try to figure out what is being applied and from where.

Wanna learn CSS from a course?

2 responses to “Still No CSS Reset”

  1. Chris Coyier says:

    Back in the day, the main purpose of a #CSS reset was to smooth over weird browser differences.

    Can we take a moment to appreciate that modern resets like @andy’s are mostly just setting reasonable defaults?

    https://mastodon.social/@noleli/111218974710392840

  2. Andy’s reset is great but I prefer to code a custom css reset.

Leave a Reply

Your email address will not be published. Required fields are marked *

Did you know?

Frontend Masters Donates to open source projects. $313,806 contributed to date.