# The algo records whose domain is css-cascade

This index as JSON: https://banes-lab.com/json/api/facets/algo/domain/css-cascade

## Entries

- [Cascade Layer Partition](https://banes-lab.com/records/algo/cascade-layer-partition.md): Declare one ordered set of named cascade layers once at the stylesheet root, assign every rule to exactly one layer, and let layer order — not selector specificity nor source order — decide precedence, so values, appearance, placement, and assembly can never fight for the same declaration.
- [Token Source-of-Truth](https://banes-lab.com/records/algo/token-source-of-truth.md): Define every design primitive — color, space, radius, the type scale, size, duration, z-index — exactly once as a custom property in the tokens layer, and forbid any downstream literal where a token exists.
- [Type-Keyed Appearance](https://banes-lab.com/records/algo/type-keyed-appearance.md): In the globals layer, define how every element and component type looks, its size, and its spacing exactly once, keyed only by element tag, `data-el` custom type, and the orthogonal `data-*` axes (`data-variant` paint, `data-size` scale, `data-gap` child rhythm, `data-tone` palette, `data-measure` width); never key appearance by a purpose-class, and let every value be a token.
- [Custom Type Registration](https://banes-lab.com/records/algo/custom-type-registration.md): Extend the stylable element vocabulary beyond the native HTML tag set by registering each semantic type against a base tag and a `data-el` stamp; the registered type becomes a first-class node the globals layer binds one appearance contract to, so a concept no native tag can express — a field-label, an icon, a toast, an entry — is styled by its type, never by a class.
- [Governed Construction Boundary](https://banes-lab.com/records/algo/governed-construction-boundary.md): Route all DOM creation through one governed factory that resolves a node spec of shape `{ el, variant, size, gap, tone, measure, layout, class, on, children }` against the type, handler, and component registries, maps each axis key to its `data-*` attribute, treats `class` as a gated hook (icon-font glyph, `u-*` utility, or `c-*` component — never bespoke, never appearance), throws on any unknown type, handler, or component, and refuses an inline `style` attribute.
- [Placement Isolation](https://banes-lab.com/records/algo/placement-isolation.md): In the components layer, set only where a component sits — position, offsets, stacking, overlay — keyed by its type, and never its look, size, or spacing, which remain owned by globals.
- [Assembly Composition](https://banes-lab.com/records/algo/assembly-composition.md): In the app layer, compose views from structural containers and arrange their children with flex or grid and token-valued gaps, pad each container once so its children are full-width and fill the padded box, forbid horizontal margins, and never set or override any element's or component's look.
- [Layer Fitness Enforcement](https://banes-lab.com/records/algo/layer-fitness-enforcement.md): Bind each layer invariant to a machine check — layer order declared once, placement properties barred from globals, class selectors barred from globals, literals barred where a token exists, no horizontal margin, all DOM through the factory, no inline style — run them as hard errors with no warn tier and no inline disables, and gate the push on a clean verdict.
- [Type-Migration Centralization](https://banes-lab.com/records/algo/type-migration-centralization.md): To move an existing purpose-class or page-scoped stylesheet into this model, treat every appearance-bearing class rule as a migration unit, derive the element type it decorates, register a custom `data-el` type when no tag or variant expresses it, move its look, size, and spacing into one global rule keyed by that type, demote any residual position into components and any residual layout into app, and verify that zero appearance rule keyed by a purpose-class remains outside the globals layer.
- [CSS Type-Cascade Kernel](https://banes-lab.com/records/algo/css-type-cascade-concern.md): Declare one layer order, hold every value in tokens, key every appearance on a type — native or custom-registered — exactly once in globals, hold placement in components and assembly in app, create all DOM through a factory that stamps types and refuses inline style, and gate the whole contract behind machine fitness functions.
