domestic-ui GitHub

domestic-ui

domestic-ui is a CSS design system built on native HTML, custom properties and cascade layers.

Get started GitHub

Link one stylesheet and semantic HTML is styled in light and dark, with WCAG 2.2 AA as the baseline. Theme it by overriding semantic tokens. It packages existing web standards and patterns. Nothing here is original.

Install and use

Plain CSS, no build step. The current release is 0.1.0 (release notes, changelog). Download the v0.1.0 source archive, copy its css/ folder into your project and link the entry point:

<link rel="stylesheet" href="css/domestic.css">

Imports are relative, so it works from any path. Paths under css/ are public API (Agent-friendly by design), versioned with Semantic Versioning.

Layer order

css/domestic.css declares the cascade layers, lowest priority first. Your unlayered CSS beats all of them.

@layer reset, tokens, base, layout, components, utilities;

Theming

Override semantic --dui-* tokens on :root, or on an element with data-theme (Theming, with a live example). Force a scheme with data-color-scheme="light" or "dark".

Component API

Each component exposes one data-<component> attribute. Its value is space-separated words matched with the ~= selector, like rel: data-button="primary small". State uses native attributes and ARIA: disabled, aria-disabled, aria-busy, aria-invalid.

Our choice: One attribute is one API to learn, it reads as a sentence (data-button="primary small"), and it cannot pile up like modifier classes.

Layout primitives and utilities: data-action-bar, .cluster, .grid, data-card, data-scroll, .stack, .visually-hidden. Base elements need no API.

How these docs are organized

The sidebar follows Brad Frost's Atomic Design: tokens, then base elements and layouts, then atoms, molecules and organisms. Patterns combine them, and web components add the behavior HTML lacks. The principles explain each choice; explainers cover the patterns no standard does.

For coding agents

llms.txt (format) indexes these docs; llms-full.txt has every page. Each page has a Markdown twin: same path, .md.

Search