Modern CSS Reset with @layer: What's New in reseter.css 3 and How to Install It

reseter.css 3 is a modern CSS reset that puts all its code in @layer reset: any CSS you write outside a layer beats it, regardless of specificity or load order. That change fixes the most common mistake of hand-written resets, and comes along with logical properties, a build with Lightning CSS, and several visual changes worth reviewing before updating.

:white_check_mark: yoDEV Tested · October 15, 2026 We installed reseter.css 2.1.0 and 3.0.1 from npm and compared them in Chromium 141 without UI against a hand-written reset, in three scenarios of load order and layers. The results we report as ours come from that test.

What is a modern CSS reset?

A CSS reset removes the styles each browser applies by default (margins, list indentation, form fonts, inline images) so you start from a predictable base. A modern CSS reset goes further: it doesn’t zero everything out. It keeps reasonable values (headings keep their margins, lists their indentation), applies box-sizing: border-box to all elements, uses logical properties to work in right-to-left layouts too, and is designed so your styles always win.

That last point is where almost all fail. A reset should be the weakest CSS on the page. In practice, hand-written resets usually use stronger selectors than the styles of the components that come after.

CSS reset or Normalize.css: which to use?

Normalize.css doesn’t erase browser styles: it equalizes them across browsers and keeps the useful ones. A reset starts from a cleaner base and decides its own default values. reseter.css 3 sits at an in-between point: it removes margins and padding with the universal selector, but returns them with browser-like values in headings and lists.

The official reseter.css documentation includes a comparison table. According to that table, reseter.css targets browsers with more than 3 percent global usage, and Normalize.css targets the last three versions of each browser. Also, reseter.css publishes a minified version ready to use, while with Normalize.css you have to minify it yourself.

How does @layer change CSS specificity in a reset?

With cascade layers (@layer) you decide which group of styles wins before CSS specificity comes into play. Styles that are not in any layer beat all those that are. Since the reset lives in @layer reset and your application’s CSS has no layer, your application wins, whatever selector each side uses.

We tested the classic mistake. A hand-written reset usually has something like:

button, input[type='submit'] { padding: 0 }

And then your component says:

.btn { padding: 12px }

Scenario <button class="btn"> <input type="submit" class="btn">
Hand-written reset + .btn 12px 0px
reseter.css 3 + .btn 12px 12px
reseter.css 3 + .btn, with your CSS loaded first 12px 12px

With the hand-written reset, the submit button stays at padding: 0 because input[type='submit'] has specificity (0,1,1) and .btn only (0,1,0). With reseter.css 3 the layer is decided first, so the specificity competition never happens.

The third row is the real novelty over version 2. reseter.css 2.1.0 already wrapped almost all its selectors in :where(), which leaves specificity at zero, so it rarely lost to your components. What it couldn’t guarantee was the load order. A zero-specificity rule in your application (for example :where(.stack) > * + * { margin-block-start: 24px }) loaded before the reset gave 0px with 2.1.0 and 24px with 3.0.1. With layers, it no longer matters in what order your bundler injects the CSS.

What rule is left out of the layer?

There’s one rule that’s left out of the layer on purpose:

:where(dialog):not([open]), [hidden]:not([hidden="until-found" i]) { display: none; }

Thanks to it, the hidden attribute keeps working even if a class defines display. In our test, .card { display: flex } on a <div class="card" hidden> stayed hidden with reseter.css 3 and became visible with the hand-written reset. The release notes don’t mention it, but it’s the right call.

How do you install reseter.css?

You can install it with npm or pnpm, or load it from a CDN. At the time of publishing this note, the latest version is 3.0.1, released October 11, 2026, and the official guide fixes all commands to that version:

npm install reseter.css@3.0.1
# or
pnpm add reseter.css@3.0.1

With a bundler, import the reset first, then your styles:

import "reseter.css";
import "./app.css";

Without a bundler, use the CDN:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reseter.css@3.0.1/dist/index.min.css">
<link rel="stylesheet" href="/styles.css">

The getting started guide repeats that same two-line pattern for React, Vue, Svelte, SvelteKit, Next.js, Nuxt, Astro, Remix, Angular, Laravel, Django, Rails, WordPress, and Eleventy.

How much does reseter.css weigh?

According to the project’s own changelog for 3.0.1, dist/index.min.css weighs 951 bytes with Brotli compression. We measured 1,178 bytes with gzip for the full build and 377 bytes for the mini build. If you’re concerned about CSS that blocks first render, Critical 9: How to Extract Critical CSS Without a Browser might also help you.

Full reseter.css or mini?

Use the full build, unless a UI library already styles your form controls. In that case use the mini (import "reseter.css/mini"), and load only one of the two, as the documentation indicates. The mini leaves out forms, links, and dialogs, and also has other differences we measured:

What Full Mini
Font weight of h2 700 400 (normal)
Margin between paragraphs (p + p) 16px 0
Border of text inputs 1px solid browser default
Font of controls system-ui stack browser default
textarea resize vertical both

The most surprising is the weight of headings: with the mini, all headings end up at normal weight.

How to use reseter.css with frameworks that use @layer?

If your framework or design system puts its base styles inside a layer, declare the layer order before anything else. Layers are ordered by when they’re first declared, and the one declared last wins. If your framework’s @layer base is declared first and reseter.css is imported after, the reset beats your base styles.

We reproduced it: with @layer base { h2 { margin-block: 0 } } declared before importing reseter.css, the h2 kept 19.92px of margin. A single line at the start fixed it:

@layer reset, base;

With that declaration, the h2 margin went to 0, as expected. The release notes warn that frameworks with layers may need attention to layer order. As of October 15, 2026, the official getting started guide doesn’t explain how to do it.

What breaks when updating from reseter.css 2 to 3?

Version 3 is a major version by semver, and the visual changes are real. These are the computed values that changed between 2.1.0 and 3.0.1 in Chromium:

Area Element 2.1.0 3.0.1
Headings top margin of h2 0 19.92px
Headings text-wrap of h1–h4 auto balance
Lists padding-inline-start of ul 0 40px
Lists bullets of ul[role="list"] disc none
Forms button border style solid outset (browser default)
Forms font of input/button/select Arial system-ui stack
Forms resize of textarea both vertical
Media display of img, svg inline block
Media max-width of img none 100%
Root text-size-adjust of html auto none

There are four areas that need visual review: headings (get their margins back), lists (get their indentation back), forms (new font and default button borders), and media (images become blocks, which can break inline icons).

Under the hood the code also changes. There are no more Sass sources, published CSS is generated with Lightning CSS, and the repository switched to pnpm. Properties are now logical (margin-block, padding-inline-start, max-inline-size) instead of physical. If you imported internal package paths, use only those that appear in the exports field of package.json. The documentation recommends import "reseter.css" and reseter.css/mini.

What does text-size-adjust: none do?

It disables the text enlargement that mobile browsers apply to pages not designed for small screens. According to MDN, a truly responsive site doesn’t need that enlargement, and disabling it doesn’t prevent the user from zooming. If your site still has layouts that aren’t responsive, check how they look on a phone after updating.


You? What rule from your reset or base styles has given you the most trouble fighting against a component’s styles?

What CSS reset do you use today?
  • One I wrote myself by hand
  • Normalize.css or similar
  • The one my framework brings
  • I prefer another option (tell us which)
0 votantes

Comment below or, if this article reached you by email, reply directly to the email: your reply gets published here.

Related: Panda CSS 2.0: The Compiler Rewritten in Rust and How to Migrate Without Breaking Your Build