Skip to content

Commit ccc3804

Browse files
committed
fix(bench): align the architecture switch with the content column
The switch is inserted as a sibling of `<main class="container">`, so it sat in the body with no width constraint and rendered flush against the viewport edge while everything below it was centred in a 920px column. It now carries `container` as well. Its own margin has to name the auto sides itself: `.container` is declared earlier in the sheet, so at equal specificity the `.arch-switch` margin wins and a plain `0 0 0.5rem` would have left it flush again.
1 parent f69818c commit ccc3804

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

website/benchmark/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,13 @@
155155

156156
/* Architecture switch. Shown only when more than one was
157157
published, so a single-architecture run looks as it always did. */
158+
/* Carries `.container` too, so it lines up with the column rather
159+
than the viewport. `.container` is declared above, so this margin
160+
wins at equal specificity and has to keep the auto sides itself. */
158161
.arch-switch {
159162
display: flex;
160163
gap: 0.35rem;
161-
margin: 0 0 0.5rem;
164+
margin: 0 auto 0.5rem;
162165
flex-wrap: wrap;
163166
}
164167
.arch-switch button {
@@ -880,7 +883,7 @@ <h2>${escape(title)}</h2>
880883

881884
if (datasets.length > 1) {
882885
const bar = document.createElement('div');
883-
bar.className = 'arch-switch';
886+
bar.className = 'arch-switch container';
884887
datasets.forEach((d, i) => {
885888
const b = document.createElement('button');
886889
b.type = 'button';

0 commit comments

Comments
 (0)