- content/vault/: _index.md, diff.md, session.md, status.md, tasks.md, wikilinks.md - content/docs/: _index.md, introduction, tokens, reset, semantic-html, components, data-attributes, navigation, layouts, charts, chroma, accordion-dialog 96 pages build clean (was 36). Docs use sidebar nav + TOC layout. Vault uses sidebar with section fallback (no vault menu configured yet). URLs fixed: playground refs → asw.trentuna.com. Closes: asw#12, asw#9
3.3 KiB
| title | description | type | weight | date | tags | ai-disclosure | ai-model | ai-provider | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Reset | What ASW's reset layer does, where it came from, and what it deliberately leaves alone. | docs | 60 | 2026-04-09 |
|
generated | claude-sonnet-4-5 | Anthropic |
ASW's reset is in src/layers/00-reset.css, ported from Pico CSS v2.1.1 (MIT). It's an opinionated normalize, not a zero-baseline reset — it corrects browser inconsistencies without stripping all defaults.
What it does
Box-sizing
Every element uses border-box. Padding and border are included in the declared width.
*, *::before, *::after {
box-sizing: border-box;
background-repeat: no-repeat;
}
background-repeat: no-repeat prevents accidental tiling on elements that receive a background image.
Document baseline
:where(:root) {
-webkit-tap-highlight-color: transparent; /* remove tap flash on mobile */
text-size-adjust: 100%; /* prevent font inflation on mobile */
text-rendering: optimizeLegibility;
overflow-wrap: break-word; /* wrap long URLs / tokens */
tab-size: 4;
}
Font size
html { font-size: 100%; }
Root font size is 100% of the browser default (typically 16px). Responsive scaling is applied in 01-tokens.css via clamp(). Setting 100% here respects user accessibility preferences — users who set a larger browser font get a proportionally larger site.
Body
body {
width: 100%;
margin: 0;
padding: 0;
font-size: var(--text-base);
font-family: var(--font-ui);
background-color: var(--surface);
color: var(--text);
}
All visual values come from ASW tokens. Font and colour are set once here and inherited everywhere.
Main
main { display: block; }
Fixes a legacy IE bug where <main> wasn't treated as a block element. Still included for completeness.
Nested lists
:where(dl, ol, ul) :where(dl, ol, ul) { margin: 0; }
Removes the double margin that browsers add to nested lists.
What it leaves alone
The reset deliberately does not:
- Zero out heading sizes or margins (those are handled by
02-semantic.css) - Remove list styles (lists get
list-style: squarein the semantic layer) - Reset form element appearance (handled by
03-components.css) - Set
line-heighton body (set viavar(--leading)in08-layout.css)
Pseudo-elements
::before, ::after {
text-decoration: inherit;
vertical-align: inherit;
}
Pseudo-elements inherit text decoration and vertical alignment from their parent. This prevents ::before/::after content from appearing unexpectedly underlined in links.
Customising the reset
The reset layer uses low-specificity :where() selectors where possible. Override anything with a standard selector — no !important needed.
/* Override: use rem-based font scaling instead of responsive clamp */
html { font-size: 1rem; }
/* Override: add body padding for a specific layout */
body { padding-inline: var(--space-4); }
Related
- Semantic HTML — element styles built on top of this reset
- Token System — the custom properties (
--surface,--text,--font-ui) referenced in this layer