Skip to content

Commit 401891a

Browse files
fix(design): Standardize color system and spacing scale (#26)
**Issue #19: Color System Standardization** - Remove ad-hoc color --bg-card-hover from governance_dashboard.html - Add standardized --hover-overlay rgba value - Add risk-level colors to dashboard.html for consistency - Add --verified color to governance_dashboard.html **Issue #21: Spacing Consistency** - Establish 8px-based spacing scale in CSS variables - Fix padding violations: 10px→12px, 6px→8px, 2px→4px - Fix margin violations: 6px→8px - Apply consistent spacing to inline styles Both dashboards now use: - Consistent design token system - 8px-based spacing (4, 8, 12, 16, 20, 24, 32, 40px) - No ad-hoc colors or spacing values Fixes #19 Fixes #21 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 654e081 commit 401891a

2 files changed

Lines changed: 41 additions & 15 deletions

File tree

dashboard.html

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@
2323
--text-secondary: #94a3b8;
2424
--border: #334155;
2525
--verified: #10b981;
26+
--risk-critical: #dc2626;
27+
--risk-high: #f59e0b;
28+
--risk-medium: #eab308;
29+
--risk-low: #84cc16;
30+
/* Hover states derived from base colors */
31+
--hover-overlay: rgba(255, 255, 255, 0.05);
32+
/* 8px-based spacing scale */
33+
--spacing-1: 4px;
34+
--spacing-2: 8px;
35+
--spacing-3: 12px;
36+
--spacing-4: 16px;
37+
--spacing-5: 20px;
38+
--spacing-6: 24px;
39+
--spacing-8: 32px;
40+
--spacing-10: 40px;
2641
}
2742

2843
body {
@@ -132,7 +147,7 @@
132147
background: var(--primary);
133148
color: white;
134149
border: none;
135-
padding: 10px 20px;
150+
padding: 12px 20px;
136151
border-radius: 6px;
137152
cursor: pointer;
138153
font-size: 14px;
@@ -272,7 +287,7 @@
272287
.legal-ref {
273288
background: rgba(8, 145, 178, 0.15);
274289
color: var(--primary);
275-
padding: 4px 10px;
290+
padding: 4px 12px;
276291
border-radius: 4px;
277292
font-size: 11px;
278293
font-weight: 600;
@@ -306,7 +321,7 @@
306321
}
307322

308323
.badge {
309-
padding: 4px 10px;
324+
padding: 4px 12px;
310325
border-radius: 4px;
311326
font-size: 11px;
312327
font-weight: 600;
@@ -342,7 +357,7 @@
342357
code {
343358
font-family: 'Courier New', monospace;
344359
background: rgba(0,0,0,0.3);
345-
padding: 2px 6px;
360+
padding: 4px 8px;
346361
border-radius: 3px;
347362
font-size: 12px;
348363
}
@@ -475,7 +490,7 @@
475490
background: rgba(0, 0, 0, 0.3);
476491
border: 1px solid var(--border);
477492
border-radius: 6px;
478-
padding: 10px 12px;
493+
padding: 12px;
479494
color: var(--text-primary);
480495
font-size: 14px;
481496
}
@@ -800,7 +815,7 @@
800815
}
801816

802817
.attestation-content li {
803-
margin: 6px 0;
818+
margin: 8px 0;
804819
}
805820

806821
.attestation-signature-block {
@@ -1759,10 +1774,10 @@ <h2 class="modal-title">Generate Compliance Audit Packet</h2>
17591774
<input type="date" class="form-input" id="dateTo" placeholder="To date">
17601775
</div>
17611776
<div style="margin-top: 8px;">
1762-
<button class="btn-secondary" onclick="setQuickRange('24h')" style="margin-right: 8px; padding: 6px 12px; border-radius: 4px; font-size: 12px;">Last 24h</button>
1763-
<button class="btn-secondary" onclick="setQuickRange('7d')" style="margin-right: 8px; padding: 6px 12px; border-radius: 4px; font-size: 12px;">Last 7d</button>
1764-
<button class="btn-secondary" onclick="setQuickRange('30d')" style="margin-right: 8px; padding: 6px 12px; border-radius: 4px; font-size: 12px;">Last 30d</button>
1765-
<button class="btn-secondary" onclick="setQuickRange('all')" style="padding: 6px 12px; border-radius: 4px; font-size: 12px;">All Time</button>
1777+
<button class="btn-secondary" onclick="setQuickRange('24h')" style="margin-right: 8px; padding: 8px 12px; border-radius: 4px; font-size: 12px;">Last 24h</button>
1778+
<button class="btn-secondary" onclick="setQuickRange('7d')" style="margin-right: 8px; padding: 8px 12px; border-radius: 4px; font-size: 12px;">Last 7d</button>
1779+
<button class="btn-secondary" onclick="setQuickRange('30d')" style="margin-right: 8px; padding: 8px 12px; border-radius: 4px; font-size: 12px;">Last 30d</button>
1780+
<button class="btn-secondary" onclick="setQuickRange('all')" style="padding: 8px 12px; border-radius: 4px; font-size: 12px;">All Time</button>
17661781
</div>
17671782
</div>
17681783

governance_dashboard.html

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,25 @@
1919
--danger: #dc2626;
2020
--bg-dark: #0f172a;
2121
--bg-card: #1e293b;
22-
--bg-card-hover: #2d3b52;
2322
--text-primary: #f1f5f9;
2423
--text-secondary: #94a3b8;
2524
--border: #334155;
25+
--verified: #10b981;
2626
--risk-critical: #dc2626;
2727
--risk-high: #f59e0b;
2828
--risk-medium: #eab308;
2929
--risk-low: #84cc16;
30+
/* Hover states derived from base colors */
31+
--hover-overlay: rgba(255, 255, 255, 0.05);
32+
/* 8px-based spacing scale */
33+
--spacing-1: 4px;
34+
--spacing-2: 8px;
35+
--spacing-3: 12px;
36+
--spacing-4: 16px;
37+
--spacing-5: 20px;
38+
--spacing-6: 24px;
39+
--spacing-8: 32px;
40+
--spacing-10: 40px;
3041
}
3142

3243
body {
@@ -212,7 +223,7 @@
212223
}
213224

214225
.risk-card:hover {
215-
background: var(--bg-card-hover);
226+
background: var(--hover-overlay);
216227
border-color: var(--primary);
217228
}
218229

@@ -319,7 +330,7 @@
319330
}
320331

321332
.escalation-card:hover {
322-
background: var(--bg-card-hover);
333+
background: var(--hover-overlay);
323334
}
324335

325336
.escalation-header {
@@ -397,7 +408,7 @@
397408
}
398409

399410
.override-card:hover {
400-
background: var(--bg-card-hover);
411+
background: var(--hover-overlay);
401412
}
402413

403414
.override-header {
@@ -445,7 +456,7 @@
445456
}
446457

447458
.evidence-card:hover {
448-
background: var(--bg-card-hover);
459+
background: var(--hover-overlay);
449460
}
450461

451462
.evidence-header {

0 commit comments

Comments
 (0)