Get the latest tech news

A Modern CSS Reset (2024 update)


I have a set of baseline CSS styles that come with me from project to project. In the past, I'd use a typical CSS reset, but times have changed, and I believe I have a better set of global styles!

It's a solid chunk of CSS, but it's a bit long in the tooth at this point; it hasn't been updated in more than a decade, and a lot has changed since then! A pedantic note Historically, the main goal of a CSS reset has been to ensure consistency between browsers, and to undo all default styles, creating a blank slate. With my CSS reset, this won’t display correctly; the max-width: 100% declaration will clamp the element’s width, not letting it grow to the specified 120%.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of update

update

Photo of Reset

Reset

Photo of modern css

modern css

Related news:

News photo

OnePlus releases Android 15-based OxygenOS 15 — here's when your phone will get the update

News photo

The Sims 4 ghostly update puts WooHoo-ing the Grim Reaper back on the table

News photo

Android 15 update is bricking some Pixel 6 devices