All articles
CSS Fundamentals

The Modern CSS Reset: What's in It and Why It Works

6 January 2025 6 min read CSS Fundamentals

Why normalize.css is showing its age, what a modern CSS reset actually includes, and the exact reset used by top design systems in 2025. Copy-paste ready.

Every project starts with a reset. But most developers are still copying a reset from 2014. Browser defaults have changed. User expectations have changed. Your reset should too.

Why normalize.css is showing its age

normalize.css was written when browsers were genuinely inconsistent in ways that mattered. IE 8 and 9 needed a lot of help. Those browsers are gone. Most of what normalize.css does today is redundant — browsers have converged significantly.

The new problems are different: box model confusion, line-height inconsistencies, unexpected overflow, form element inheritance, focus styles that disappear.

The modern CSS reset (copy-paste ready)
/* Modern CSS Reset — CSSToolBox */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  hanging-punctuation: first last;
  color-scheme: light dark;
}

body {
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, video, canvas, svg, picture {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

#root, #__next {
  isolation: isolate;
}
What each rule does and why
  • box-sizing: border-box — padding and border are included in width/height. Essential. Should have been the default.
  • margin: 0 on * — removes all default margins. Add spacing intentionally.
  • min-height: 100dvh — uses dynamic viewport height (avoids iOS Safari address bar issues).
  • -webkit-font-smoothing: antialiased — better font rendering on macOS.
  • font: inherit on form elements — stops inputs rendering in the browser default font.
  • text-wrap: balance on headings — prevents orphaned single words on their own line.
  • text-wrap: pretty on paragraphs — similar, but optimised for longer text blocks.
  • isolation: isolate on root — creates a stacking context that prevents z-index bleed.
// Try these tools CSS Snippets Templates