|
| 1 | +/* Put these with your other :root vars */ |
| 2 | +:root { |
| 3 | + /* header fills (light) */ |
| 4 | + --tbl-white: #ffffff; |
| 5 | + --tbl-blue: #8eb3f0; |
| 6 | + --tbl-green: #bbe5d1; |
| 7 | + --tbl-red: #f8caca; |
| 8 | + } |
| 9 | + |
| 10 | + @media (prefers-color-scheme: dark) { |
| 11 | + :root { |
| 12 | + /* darker tints that read well with white text */ |
| 13 | + --tbl-white: #4a5a7b; /* slate-ish */ |
| 14 | + --tbl-blue: #0c2658; /* deep blue */ |
| 15 | + --tbl-green: #07402d; /* deep green */ |
| 16 | + --tbl-red: #5d1d1d; /* deep red */ |
| 17 | + } |
| 18 | + } |
| 19 | + |
1 | 20 | /* Variables mapped to the other app’s palette (light) */ |
2 | 21 | :root { |
3 | 22 | --bg: #ffffff; /* base background */ |
|
9 | 28 | --fk: #0ea5e9; /* accent-primary */ |
10 | 29 | --danger: #dc2626; /* error */ |
11 | 30 | --accent: #0ea5e9; /* accent-primary */ |
| 31 | + --canvas: #f8fafc; /* was hard-coded on #diagram */ |
| 32 | + --control-bg: #ffffff; /* inputs & buttons bg (light) */ |
| 33 | + --control-border: #e2e8f0; /* inputs & buttons border (light) */ |
| 34 | + --fk: #0ea5e9; /* light blue for light theme */ |
12 | 35 | } |
13 | 36 |
|
14 | 37 | /* Dark mode: override only color variables */ |
|
27 | 50 | --fk: #38bdf8; |
28 | 51 | --danger: #ef4444; |
29 | 52 | --accent: #38bdf8; |
| 53 | + --canvas: #1e2640; |
| 54 | + --control-bg: #1f2937; |
| 55 | + --control-border: #94a3b8; |
| 56 | + --fk: #ffffff; /* arrows & markers turn white in dark theme */ |
30 | 57 | } |
31 | 58 | } |
32 | 59 |
|
|
50 | 77 | main.layout{display:grid;grid-template-columns:300px 1fr;height:calc(100% - 50px)} |
51 | 78 | #diagram-wrap{width:100%;height:100%} |
52 | 79 |
|
53 | | - #diagram{background:#f8fafc} |
| 80 | + #diagram{ background: var(--canvas); } |
54 | 81 |
|
55 | 82 | aside#sidebar{ |
56 | 83 | padding:10px;overflow:auto;border-right:1px solid var(--stroke); |
57 | | - background:#f8fafc |
| 84 | + background: var(--bg); |
58 | 85 | } |
59 | 86 | .card{ |
60 | 87 | background:var(--box); |
|
66 | 93 | label{display:flex;flex-direction:column;gap:.25rem;margin:.4rem 0} |
67 | 94 | label.row{flex-direction:row;align-items:center;gap:.5rem} |
68 | 95 |
|
69 | | - input,select,button{padding:.5rem;border:1px solid #e2e8f0;border-radius:6px;font:inherit} |
| 96 | + /* Make controls use the tokens in both modes */ |
| 97 | + input, select, button { |
| 98 | + padding: .5rem; |
| 99 | + border: 0.5px solid var(--control-border); |
| 100 | + border-radius: 6px; |
| 101 | + background: var(--control-bg); |
| 102 | + color: var(--fg); |
| 103 | + font: inherit; |
| 104 | + } |
70 | 105 | input[type="checkbox"]{padding:0} |
71 | 106 | button{cursor:pointer;border-radius:.5rem} |
72 | 107 |
|
| 108 | + /* Dark-mode specifics */ |
| 109 | +@media (prefers-color-scheme: dark) { |
| 110 | + /* 1) Sidebar “menus” (cards) should have no border in dark */ |
| 111 | + .card { border: none; } |
| 112 | + |
| 113 | + /* 2) Buttons should be dark with light-grey border */ |
| 114 | + button { background: var(--control-bg); border-color: var(--control-border); } |
| 115 | + |
| 116 | + /* Optional: make the danger button less blinding in dark */ |
| 117 | + button.danger { |
| 118 | + background: rgba(239, 68, 68, 0.12); |
| 119 | + border-color: rgba(239, 68, 68, 0.45); |
| 120 | + color: var(--danger); |
| 121 | + } |
| 122 | + |
| 123 | + /* 3) Inputs dark with grey default (placeholder) text */ |
| 124 | + input::placeholder, |
| 125 | + textarea::placeholder { |
| 126 | + color: var(--muted); |
| 127 | + opacity: 1; /* ensure consistent grey */ |
| 128 | + } |
| 129 | +} |
| 130 | + |
73 | 131 | /* Danger button colors mapped to semantic tokens (no layout change) */ |
74 | 132 | button.danger{ |
75 | 133 | background:#fef2f2; /* error-bg */ |
|
81 | 139 |
|
82 | 140 | text{font-size:12px;fill:var(--fg);dominant-baseline:middle} |
83 | 141 | .table-title{font-weight:600} |
| 142 | + .table-box { |
| 143 | + fill: var(--box) !important; |
| 144 | + stroke: var(--stroke) !important; |
| 145 | + } |
84 | 146 |
|
85 | 147 | .table.selected rect{stroke:var(--accent);stroke-width:2} |
86 | 148 |
|
|
0 commit comments