Css universal design boilerplate. Works without interference to HTML.
- Universal Design (variants included) based on digital government jp design system, CUDO: Color Universal Design Recommended Color Set ver.3, WCAG 2.2, ARIA APG, IEC60447:1993(Man-machine-interface Principle).
- Requires to html only semantic and also structural tag's structure and minimum anonymous elements.
- Render correctly without JS.
- Each component's CSS file starts with an HTML comment showing its expected HTML structure.
- All CSS Property is described in order of dependencies, and then, alphabetical.
| Version | Status | Date | Description |
|---|---|---|---|
| 0.1.0 | Scheduled | 2026-08-31 | 1st release |
Every component below reuses these same column names — a component either consumes a value as-is or overrides it locally.
data-size |
box-height | font-size | letter-spacing | line-height |
|---|---|---|---|---|
xs |
1.75rem | 0.85rem | 0.02rem | 1.5rem |
sm |
2.5rem | 0.85rem | 0.02em | 1.5rem |
md(default) |
3rem | 1rem | 0 | 1.5rem |
lg |
3.5rem | 1.15rem | 0 | 1.725rem |
xl |
4rem | 1.5rem | 0 | 2.25rem |
2xl |
4.75rem | 2rem | 0 | 3rem |
/* config.css */
@layer css.config {
:root {
--xs-box-height: 1.75rem; /* border-box height */
--xs-font-size: 0.85rem;
--xs-letter-spacing: 0.02rem;
--xs-line-height: 1.5rem;
/* ... */
}
}padding-block, wherever a component consumes abox-height, is derived ascalc((var(--{size}-box-height) - var(--{size}-line-height)) / 2)— this centers the line box inside the scale's box-height regardless of component. Howbox-heightitself is applied differs by component's native sizing behavior:button:min-height(grows with content)input(text, number),select,toggle:height(fixed)checkbox,radio: label is box-height, input is line-height.textarea:height: auto; resize: vertical(grows with content).box-heightis only ever read to derivepadding-blockdisclosure(summary):height: auto(grows with content). Same rule as textarea.heading:padding-block: 0
padding-inline, component has of its own (an icon, a stepper button, a dropdown arrow) is a component-local decision, so hardcoded inrem, not unified across components.widthis left unset (auto / content-driven) everywhere. Nothing hardcodes a fixed width or100%; give an element a width via the surrounding markup (a wrappingstyle/class) when one is needed.data-sizefallback: omittingdata-sizedefaults tomdeverywhere. Onlyheading(h1–h6, or via a wrappinghgroup) defaults by element:h1→2xl,h2→xl,h3→lg,h4/h5/h6→md.