style: clean up dead CSS, add CSS variables, improve responsive rules (Task 10.10)

- Remove dead .kpi-row/.kpi-card CSS (KPI row replaced by header fraction KPIs)
- Remove dead .top-header__breadcrumb CSS (breadcrumb removed in 10.3)
- Remove dead .filter-select CSS (replaced by dcc.Dropdown)
- Remove dead .sidebar__item--disabled CSS (disabled items removed in restructure)
- Delete unused dash_app/components/kpi_row.py
- Add --sub-header-h and --header-total-h CSS variables
- Update .main and .sub-header to use CSS variables instead of hardcoded values
- Add responsive rules: header KPIs collapse at 1200px, hide at 768px
- Add responsive pathway-filters wrap at 768px
- Remove dead .kpi-row responsive rules
This commit is contained in:
Andrew Charlwood
2026-02-06 22:39:48 +00:00
parent ba9909f151
commit c5b6191a5b
3 changed files with 16 additions and 111 deletions
-46
View File
@@ -1,46 +0,0 @@
"""KPI row component — 4 metric cards with callback-updatable values."""
from dash import html
def make_kpi_row():
"""Return a section with 4 KPI cards matching 01_nhs_classic.html structure."""
return html.Section(
className="kpi-row",
**{"aria-label": "Key performance indicators"},
children=[
_kpi_card("Unique Patients", "kpi-patients", "", "across all trusts"),
_kpi_card("Drug Types", "kpi-drugs", "", "high-cost drugs tracked"),
_kpi_card("Total Cost", "kpi-cost", "", "current period spend"),
_kpi_card(
"Indication Match",
"kpi-match",
"",
"GP diagnosis confirmed",
modifier="kpi-card--green",
),
],
)
def _kpi_card(label, value_id, default_value, sub_text, modifier=None):
"""Build a single KPI card.
Args:
label: uppercase label text
value_id: HTML id for the value span (for callback Output)
default_value: initial display value before callbacks fire
sub_text: description below the value
modifier: optional CSS modifier class (e.g. 'kpi-card--green')
"""
card_class = "kpi-card"
if modifier:
card_class += f" {modifier}"
return html.Div(
className=card_class,
children=[
html.Div(label, className="kpi-card__label"),
html.Div(default_value, className="kpi-card__value", id=value_id),
html.Div(sub_text, className="kpi-card__sub"),
],
)