domestic-ui GitHub

Cascade layers

css/domestic.css declares the order once, before anything else (@layer on MDN, CSS Cascade 5):

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

Later layers win over earlier ones regardless of selector specificity, and your own unlayered CSS beats all of them, so overriding never needs !important or specificity tricks.

LayerContents
resetA modest reset: box-sizing, zero margins, block media, inherited form fonts
tokensPrimitive and semantic custom properties
baseNative elements: typography, lists, tables, forms, buttons, dialog, details, focus
layout.stack, .cluster, .grid, [data-scroll] and the page layouts (list-detail, split, dashboard, action bar, app shell)
componentsAtoms in css/components/atoms/ (M2), molecules in css/components/molecules/ (M3a) and organisms in css/components/organisms/ (M3b). See the atoms index, the molecules index and the organisms index
utilitiesSingle-purpose helpers such as .visually-hidden; last so they always apply

Our choice: this order, because each layer only refines the ones before it, and a utility should beat a component the way an inline override would.

Search