Skip to content

Commit 25eb32e

Browse files
authored
Improve developer menu and non-standard params table styling (#512)
- Use tags-style for step-button - Increase start / step button icon - Use red highlight color for non-standard params - Use explicit font-size for developerMenu button for more consistent rendering across browsers
1 parent 0746a31 commit 25eb32e

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

resources/developer-mode.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,13 @@ function createSuitesTagsButton(setSuiteEnabled) {
226226

227227
function createUIForRun() {
228228
const stepTestButton = document.createElement("button");
229-
stepTestButton.textContent = "Step Test \u23EF";
229+
stepTestButton.className = "step-button";
230+
stepTestButton.innerHTML = "Step Test<span>\u23EF</span>";
230231
stepTestButton.onclick = (event) => {
231232
globalThis.benchmarkClient.step();
232233
};
233234
const startTestButton = document.createElement("button");
234-
startTestButton.textContent = "Start Test \u23F5";
235+
startTestButton.innerHTML = "Start Test<span>\u23F5</span>";
235236
startTestButton.onclick = (event) => {
236237
globalThis.benchmarkClient.start();
237238
};

resources/main.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,28 @@ button,
287287
}
288288

289289
.developer-mode-content button {
290+
font-size: 16px;
290291
background: white;
291292
flex: auto;
292293
padding: 4px;
293294
appearance: button;
294295
border: 2px solid rgba(255, 255, 255, 0.5);
295296
border-radius: 10px;
296297
}
298+
299+
.developer-mode-content button span {
300+
padding-left: 10px;
301+
font-size: 1.5em;
302+
line-height: 10px;
303+
position: relative;
304+
top: 2px;
305+
}
306+
297307
.developer-mode-content .tag {
298308
border-radius: 100vh;
309+
}
310+
311+
.developer-mode-content .step-button {
299312
color: white;
300313
background: rgba(255, 255, 255, 0.1);
301314
}
@@ -518,6 +531,8 @@ section#details .non-standard-params {
518531
display: none;
519532
text-align: center;
520533
margin-bottom: 2em;
534+
/* Increase contrast a bit */
535+
filter: brightness(1.5);
521536
}
522537

523538
section#details .non-standard-params h2 {
@@ -547,6 +562,9 @@ section#details .non-standard-params h2 {
547562
#non-standard-params-table tbody td {
548563
padding: 0.1em 0.3em;
549564
}
565+
#non-standard-params-table tbody td:nth-child(2) {
566+
color: var(--highlight);
567+
}
550568

551569
section#details .all-metric-results {
552570
flex: auto;

0 commit comments

Comments
 (0)