Skip to content

Commit 5116b27

Browse files
committed
Improve playground UI with better status indicators
- Enhanced status badge styling with background colors and borders - Added visual distinction for ready/compiling/error states - Refined spacing and typography for better readability
1 parent bdc6f2d commit 5116b27

File tree

2 files changed

+1155
-36
lines changed

2 files changed

+1155
-36
lines changed

nullsafe-playground/index.html

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -166,41 +166,35 @@
166166
}
167167

168168
.status {
169-
color: var(--text-muted);
170-
font-size: 14px;
169+
color: var(--text-primary);
170+
font-size: 13px;
171171
margin-left: auto;
172-
display: flex;
172+
display: inline-flex;
173173
align-items: center;
174-
gap: 8px;
175-
}
176-
177-
.status::before {
178-
content: '';
179-
width: 8px;
180-
height: 8px;
181-
border-radius: 50%;
182-
background: var(--text-muted);
183-
display: inline-block;
184-
animation: pulse 2s infinite;
185-
}
186-
187-
.status.ready::before {
188-
background: var(--success);
189-
animation: none;
174+
gap: 6px;
175+
padding: 6px 14px;
176+
border-radius: 16px;
177+
background: var(--bg-tertiary);
178+
border: 1px solid var(--border-color);
179+
font-weight: 500;
190180
}
191181

192-
.status.compiling::before {
193-
background: var(--warning);
182+
.status.ready {
183+
background: rgba(78, 201, 176, 0.15);
184+
border-color: rgba(78, 201, 176, 0.3);
185+
color: var(--success);
194186
}
195187

196-
.status.error::before {
197-
background: var(--error);
198-
animation: none;
188+
.status.compiling {
189+
background: rgba(255, 184, 77, 0.15);
190+
border-color: rgba(255, 184, 77, 0.3);
191+
color: var(--warning);
199192
}
200193

201-
@keyframes pulse {
202-
0%, 100% { opacity: 1; }
203-
50% { opacity: 0.5; }
194+
.status.error {
195+
background: rgba(255, 82, 82, 0.15);
196+
border-color: rgba(255, 82, 82, 0.3);
197+
color: var(--error);
204198
}
205199

206200
.loading-spinner {
@@ -212,7 +206,7 @@
212206

213207
.loading-bar {
214208
width: 3px;
215-
background: white;
209+
background: currentColor;
216210
border-radius: 2px;
217211
animation: loading-bounce 0.8s ease-in-out infinite;
218212
}
@@ -238,14 +232,6 @@
238232
}
239233
}
240234

241-
.status:has(.loading-spinner)::before {
242-
display: none;
243-
}
244-
245-
.status.ready { color: var(--success); }
246-
.status.compiling { color: var(--warning); }
247-
.status.error { color: var(--error); }
248-
249235
.main-container {
250236
display: flex;
251237
flex: 1;

0 commit comments

Comments
 (0)