AntaNormalization MENU
On this page

Normalization

Anta ships an opinionated reset + typography baseline in reset.css, so plain HTML (<h2>, <ul>, <a>, <table>…) renders in the same visual language as the components — no per-page restyling to make prose match a <Title> or a <Table>.

It’s a separate import, and every rule lives in a single cascade layer (@layer anta), so it’s easy to layer your own reset around it or override any piece. If you’d rather bring your own reset, just don’t import this one.

import '@antadesign/anta/tokens.css' // design tokens
import '@antadesign/anta/reset.css' // ← this page (optional)
import '@antadesign/anta/elements' // web components (client-side only)

What it normalizes

Structural reset

Typography (Anta’s opinion)

This is not a neutral normalize — these defaults make raw markup match the components.

Everything above is defined in src/reset.css, inside @layer anta — read that file for the authoritative set (it’s short and commented). The headings block is duplicated in src/elements/a-title.css; the two are kept in sync.

Cascade layers — how to override

Anta declares this layer order once (in tokens.css):

@layer base, anta, components, utilities;

Everything Anta ships — this reset and the element styles — lives in @layer anta. That placement is deliberate:

Gotcha — don’t re-add a universal hard reset unlayered. Overriding a specific element unlayered is the intended escape hatch (below). But a blanket * { margin: 0 } / *, *::before, *::after { box-sizing: border-box } left unlayered also outranks Anta’s per-element defaults — its p, caption, and ul / ol margins — because unlayered wins over @layer anta regardless of specificity. Anta already runs that universal * reset itself, inside @layer anta, so the copy-pasted duplicate is redundant and harmful: delete it, or if you keep your own reset wrap it in @layer base { … } (below anta) so Anta’s element defaults still apply.

Override one thing

Write the rule unlayered (or in a layer after anta) — targeting a specific element, not *:

/* wins over Anta's @layer anta reset — no !important */
h2 { letter-spacing: -0.01em; }

Bring your own reset

Because reset.css is a separate import, you can simply not import it and let your own reset govern typography — keep the tokens and elements:

import '@antadesign/anta/tokens.css' // keep — tokens
import '@antadesign/anta/elements' // keep — components
// no '@antadesign/anta/reset.css' // your reset is in charge

One dependency to keep: Anta’s elements don’t set their own box-sizing — they assume the global * { box-sizing: border-box } that this reset provides. Every common reset (normalize.css, Tailwind’s preflight, etc.) sets it too, so swapping resets is normally seamless; but if yours doesn’t, keep that one rule or component padding, max-width, and icon-button sizing will be slightly off.

Or import both and override only the pieces you want (unlayered, or in a later layer).

Why it’s opinionated

A blank-slate reset would leave headings, lists, links, and tables looking like raw browser defaults — out of step with the components beside them. Anta’s reset instead gives plain markup the same baseline as <Title>, <Table>, and the link styles, so a page mixing prose and components reads as one system. When you want a clean slate, opt out above.