Skip to content

ADR-0001 — Module-scoped CSS architecture

Status: accepted Date: 2026-05-31

Context

A SiS app may use only a subset of ui_components/ (e.g. metric and header only). Loading all component CSS at startup wastes SiS startup time and creates specificity conflicts.

Decision

style.css covers Streamlit normalization only (CSS variables, layout, native component overrides). Each ui_components/<module>/ owns its own .css file, loaded on demand by setup_page() via load_static_asset() only when that module is imported.

Consequences

SiS startup time stays predictable as the kit grows. Component styles are colocated with their Python module — easier to maintain. A page never loads CSS for components it doesn't use.