Skip to content

Commit b131126

Browse files
authored
Status update and CSS fixes (#169)
- Use flexbox and use a uniform var(--gap) - Only make the workload results section scrollable - Do not change the item order during running, but rather update the results in place and scroll them into view - Simplify CSS a bit and avoid most media-size based custom results - Use uniform min-width between results and start button
1 parent c9c0d98 commit b131126

File tree

3 files changed

+52
-50
lines changed

3 files changed

+52
-50
lines changed

JetStream.css

Lines changed: 49 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,22 @@
3939
--benchmark-heading-color: rgb(183, 183, 183);
4040
--benchmark-error-text-color: #ff8686;
4141
--benchmark-done-result-color: #4A4A4A;
42+
--gap: 3rem;
43+
--width: 200px;
4244
}
4345

4446
html,
4547
svg text {
4648
font-family: "Helvetica Neue", Helvetica, Verdana, sans-serif;
4749
font-size: 62.5%;
4850
font-synthesis: none;
51+
height: 100vh;
4952
}
5053

5154
body {
55+
display: flex;
56+
flex-direction: column;
57+
gap: var(--gap);
5258
margin: 0;
5359
font-size: 1.6rem;
5460
font-weight: 400;
@@ -58,32 +64,48 @@ body {
5864
background-size: 100vw;
5965
padding-bottom: 0px;
6066
background-image: url('clouds.svg');
67+
overflow-y: hidden;
68+
height: 100%;
69+
}
70+
71+
.overflow-scroll {
72+
overflow-y: auto;
73+
}
74+
75+
.overflow-visible {
76+
overflow: visible;
6177
}
6278

79+
6380
::selection {
6481
background-color: var(--color-primary);
6582
color: var(--text-color-inverse);
6683
}
6784

6885
main {
69-
display: block;
86+
display: flex;
87+
flex-direction: column;
88+
gap: var(--gap);
89+
margin: 0 auto;
90+
padding: 0 var(--gap);
7091
max-width: 1180px;
71-
margin: auto;
7292
text-align: center;
93+
flex: 1;
94+
overflow: hidden;
95+
}
96+
97+
main p {
98+
margin: 0;
7399
}
74100

75101
img {
76-
-webkit-user-select: none;
77102
-webkit-user-drag: none;
103+
user-select: none;
78104
}
79105

80106
.logo {
81107
box-sizing: border-box;
82108
width: 100%;
83-
-webkit-touch-callout: none;
84-
-webkit-user-select: none;
85-
-moz-user-select: none;
86-
-ms-user-select: none;
87109
user-select: none;
88110
perspective: 600;
89111
}
@@ -127,27 +149,28 @@ img {
127149
text-align: center;
128150
}
129151

130-
.summary+.summary {
131-
padding-top: 5px;
132-
margin-top: 5px;
133-
}
134-
135152
.summary:empty {
136153
display: none;
137154
}
138155

139156
article,
140157
.summary {
141158
max-width: 70rem;
142-
margin: 0 auto 1rem;
159+
margin: 0 auto 0 auto;
143160
opacity: 0;
144161
animation: fadein 0.5s ease-in-out forwards;
145162
animation-delay: 200ms;
146163
}
147164

165+
article {
166+
display: flex;
167+
flex-direction: column;
168+
gap: var(--gap);
169+
}
148170
h1 {
149171
color: var(--text-color-primary);
150172
text-align: center;
173+
margin-bottom: 0;
151174
}
152175

153176

@@ -170,7 +193,6 @@ h6 {
170193
p {
171194
text-align: left;
172195
color: var(--text-color-secondary);
173-
margin: 0 0 3rem 0;
174196
}
175197

176198
h5,
@@ -204,10 +226,6 @@ a:active {
204226
color: var(--link-hover-color);
205227
}
206228

207-
#status {
208-
margin: 2rem 0rem;
209-
}
210-
211229
#status label,
212230
a.button {
213231
display: inline-block;
@@ -219,11 +237,10 @@ a.button {
219237
color: var(--text-color-inverse);
220238
border: 1px solid var(--button-color-primary);
221239
border-radius: 2px;
222-
padding: 0.3rem 9rem 0.5rem;
240+
padding: 0.3rem 0.3rem 0.5rem;
241+
text-align: center;
242+
width: var(--width);
223243
-webkit-touch-callout: none;
224-
-webkit-user-select: none;
225-
-moz-user-select: none;
226-
-ms-user-select: none;
227244
user-select: none;
228245
}
229246

@@ -253,9 +270,6 @@ a.button {
253270
-webkit-background-clip: text;
254271
background-repeat: no-repeat;
255272
-webkit-touch-callout: none;
256-
-webkit-user-select: none;
257-
-moz-user-select: none;
258-
-ms-user-select: none;
259273
user-select: none;
260274
}
261275

@@ -312,20 +326,26 @@ a.button {
312326
display: flex;
313327
flex-wrap: wrap;
314328
justify-content: space-around;
329+
gap: var(--gap);
330+
margin: 0 calc(var(--gap) * -1) 0 calc(-var(--gap) * -1);
315331
animation: fadein 500ms ease-out forwards;
316332
opacity: 0;
333+
overflow-y: auto;
334+
flex: 1;
335+
padding-bottom: var(--gap);
336+
box-sizing: border-box;
317337
}
318338

319339
.benchmark {
320340
position: relative;
321341
flex: 1;
322342
max-width: 20%;
323-
min-width: 200px;
343+
min-width: var(--width);
324344
text-align: left;
325345
color: var(--text-color-very-subtle);
326346
font-size: 1.6rem;
327-
margin: 0 1.6rem 3rem 0;
328-
347+
scroll-margin-top: 20vh;
348+
scroll-margin-bottom: 20vh;
329349
}
330350

331351
.benchmark h4,
@@ -359,9 +379,6 @@ a.button {
359379
background-color: transparent;
360380
background-image: none;
361381
-webkit-touch-callout: revert;
362-
-webkit-user-select: text;
363-
-moz-user-select: text;
364-
-ms-user-select: text;
365382
user-select: text;
366383
}
367384

@@ -545,15 +562,4 @@ dt:target {
545562
#jetstreams {
546563
background-size: 200%;
547564
}
548-
549-
550-
article,
551-
.summary {
552-
padding-top: 10rem;
553-
margin: 0 1rem;
554-
}
555-
556-
a.button {
557-
padding: 0.3rem 6rem 0.5rem;
558-
}
559-
}
565+
}

JetStreamDriver.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,6 @@ class Driver {
362362
if (!isInBrowser)
363363
return;
364364

365-
for (let f = 0; f < 5; f++)
366-
text += `<div class="benchmark fill"></div>`;
367-
368365
const timestamp = performance.now();
369366
document.getElementById('jetstreams').style.backgroundImage = `url('jetstreams.svg?${timestamp}')`;
370367
const resultsTable = document.getElementById("results");
@@ -1064,10 +1061,9 @@ class Benchmark {
10641061
}
10651062

10661063
updateUIBeforeRunInBrowser() {
1067-
const containerUI = document.getElementById("results");
10681064
const resultsBenchmarkUI = document.getElementById(`benchmark-${this.name}`);
1069-
containerUI.insertBefore(resultsBenchmarkUI, containerUI.firstChild);
10701065
resultsBenchmarkUI.classList.add("benchmark-running");
1066+
resultsBenchmarkUI.scrollIntoView({ block: "nearest" });
10711067

10721068
for (const id of this.scoreIdentifiers())
10731069
document.getElementById(id).innerHTML = "...";

in-depth.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
<link rel="stylesheet" href="JetStream.css">
3333

3434
</head>
35-
<body>
35+
<body class="overflow-scroll">
3636
<h1 class="logo">
3737
<div id="jetstreams">
3838
<a href="index.html" class="logo-image">JetStream 3</a>
3939
</div>
4040
</h1>
41-
<main>
41+
<main class="overflow-visible">
4242
<article>
4343
<h2>In-Depth Analysis</h2>
4444

0 commit comments

Comments
 (0)