diff --git a/steward/static/steward.css b/steward/static/steward.css index ddd1835..b86db83 100644 --- a/steward/static/steward.css +++ b/steward/static/steward.css @@ -3,9 +3,9 @@ * Values come from theme.css, the stylesheet design system 6 ("Steward", * inheriting FabledSword) generates. The short names below are Steward's * aliases onto those tokens, kept so templates written against them still - * render; new work writes the --fs-* token. Contrast measured 2026-10-06 - * (#5092): every text colour here is at least 4.5:1 on page, card, hover - * and its own 15-25% tint. + * render; new work writes the --fs-* token. Contrast is a CI guard + * (tests/test_contrast.py): text 4.5:1 and control outlines 3:1 on page, + * card and hover, and status text on its own tint over each of them. */ :root { --bg: var(--fs-surface-page); @@ -13,6 +13,9 @@ --bg-elevated: var(--fs-surface-hover); --border: color-mix(in srgb, var(--fs-border-color) 70%, var(--fs-surface-raised)); --border-mid: var(--fs-border-color); + /* The outline that marks a control (input, select, ghost button): 3:1 on + page, card and hover (WCAG 1.4.11), where --border-mid is ~1.4-1.9:1. */ + --border-control: color-mix(in srgb, var(--fs-text-secondary) 45%, var(--fs-border-color)); --text: var(--fs-text-primary); --text-muted: var(--fs-text-secondary); --text-dim: var(--fs-text-tertiary); @@ -21,15 +24,17 @@ --gold-dim: var(--fs-accent-soft); --accent: var(--fs-accent); --accent-hover: var(--gold-hover); - /* Status: the -fg colour is the text and indicator; the -dim tint sits behind it. */ + /* Status: the -fg colour is the text and indicator; the -dim tint sits behind it. + Warning, error and their mix are lifted toward the primary text: the house + -fg falls to ~4.0:1 on its own tint over a hovered row (#5096). */ --green: var(--fs-success-fg); --green-dim: color-mix(in srgb, var(--fs-success) 20%, transparent); - --yellow: var(--fs-warning-fg); + --yellow: color-mix(in srgb, var(--fs-warning-fg) 85%, var(--fs-text-primary)); --yellow-dim: color-mix(in srgb, var(--fs-warning) 20%, transparent); /* Between warning and error: the worse-than-warning band (slow, degraded). */ - --orange: color-mix(in srgb, var(--fs-warning-fg) 50%, var(--fs-error-fg)); + --orange: color-mix(in srgb, color-mix(in srgb, var(--fs-warning-fg) 50%, var(--fs-error-fg)) 82%, var(--fs-text-primary)); --orange-dim: color-mix(in srgb, var(--fs-warning) 20%, transparent); - --red: var(--fs-error-fg); + --red: color-mix(in srgb, var(--fs-error-fg) 85%, var(--fs-text-primary)); --red-dim: color-mix(in srgb, var(--fs-error) 20%, transparent); /* Info (acknowledged): lighter than the house --fs-info-fg (50%), which falls to 4.18:1 on its tint over a hovered row; 40% holds 5.09:1 there. */ @@ -181,7 +186,7 @@ strong, b, th { font-weight: 500; } .form-group { margin-bottom: 1rem; } label { display: block; margin-bottom: 0.3rem; font-size: 0.85rem; color: var(--text-muted); font-family: var(--fs-font-body); } input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea { - width: 100%; padding: 0.5rem 0.75rem; background: var(--bg); border: 1px solid var(--border-mid); + width: 100%; padding: 0.5rem 0.75rem; background: var(--bg); border: 1px solid var(--border-control); border-radius: 5px; color: var(--text); font-size: 0.9rem; font-family: inherit; transition: border-color .15s; } @@ -197,7 +202,7 @@ textarea { resize: vertical; } .field-label { display: block; margin-bottom: 0; font-size: 0.75rem; color: var(--text-muted); } .field-hint { font-size: 0.75rem; color: var(--text-dim); } .field-error { font-size: 0.85rem; color: var(--red); margin-bottom: 0.75rem; } -.input { width: 100%; padding: 0.4rem 0.65rem; background: var(--bg); border: 1px solid var(--border-mid); border-radius: var(--fs-radius-sm); color: var(--text); font-size: 0.88rem; font-family: inherit; } +.input { width: 100%; padding: 0.4rem 0.65rem; background: var(--bg); border: 1px solid var(--border-control); border-radius: var(--fs-radius-sm); color: var(--text); font-size: 0.88rem; font-family: inherit; } .input:focus { outline: none; border-color: var(--accent); } .input:disabled { opacity: var(--fs-disabled-opacity); } @@ -206,7 +211,7 @@ textarea { resize: vertical; } .btn:hover { background: var(--accent-hover); color: var(--fs-surface-page); } .btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; } .btn-icon { padding: 0.3rem 0.5rem; line-height: 1; } -.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-mid); } +.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-control); } .btn-ghost:hover { background: var(--bg-elevated); color: var(--text); } .btn-danger { background: var(--fs-action-destructive); color: var(--fs-text-on-action); } .btn-danger:hover { background: var(--fs-action-destructive-hover); color: var(--fs-text-on-action); } @@ -302,7 +307,7 @@ a.stat-tile:hover { border-color: var(--border-mid); background: var(--bg-elevat .breadcrumb { display:flex; align-items:center; flex-wrap:wrap; gap:0.35rem; font-size:0.78rem; color:var(--text-dim); margin:0 0 0.45rem; } .breadcrumb a { color:var(--text-muted); } .breadcrumb a:hover { color:var(--text); } -.breadcrumb-sep { color:var(--border-mid); } +.breadcrumb-sep { color:var(--text-dim); } .breadcrumb-cur { color:var(--text-muted); } /* Stat cards (dashboard) */ @@ -369,6 +374,6 @@ body.dash-editing .widget-drawer { transform:translateY(0); } .widget-link:hover { color:var(--text); } /* Time range selector */ -.range-btn { background:none; border:1px solid var(--border-mid); border-radius:4px; color:var(--text-muted); padding:0.18rem 0.5rem; cursor:pointer; font-size:0.75rem; font-family:inherit; transition:background .1s,color .1s,border-color .1s; } +.range-btn { background:none; border:1px solid var(--border-control); border-radius:4px; color:var(--text-muted); padding:0.18rem 0.5rem; cursor:pointer; font-size:0.75rem; font-family:inherit; transition:background .1s,color .1s,border-color .1s; } .range-btn:hover { background:var(--bg-elevated); color:var(--text); border-color:var(--accent); } .range-btn.active { background:var(--accent); border-color:var(--accent); color:var(--fs-surface-page); } diff --git a/steward/templates/_macros.html b/steward/templates/_macros.html index 3b3b470..a9b2716 100644 --- a/steward/templates/_macros.html +++ b/steward/templates/_macros.html @@ -9,9 +9,9 @@ {%- if loop.last -%} {%- elif href -%} - {{ label }} + {{ label }} {%- else -%} - {{ label }} + {{ label }} {%- endif -%} {%- endfor -%} diff --git a/steward/templates/dashboard/_widget_drawer.html b/steward/templates/dashboard/_widget_drawer.html index 47f9957..8af9711 100644 --- a/steward/templates/dashboard/_widget_drawer.html +++ b/steward/templates/dashboard/_widget_drawer.html @@ -33,26 +33,19 @@ - + {% for p in w.params %}