Archived
dashboard: sit the download glyph on the baseline instead of floating above it
The icon looked awkward next to REQUESTS: it floated a hair above the caps. The header aligns its items on the text baseline, and an inline SVG's baseline is its box bottom, so the box bottom was on the baseline -- but the tray bar was drawn at y 13.5 of a 16-unit viewBox, leaving 1.7 units of empty space below it. The visible bar therefore sat above the baseline while the letters sat on it. Redrawn so the bar's stroke bottom lands exactly on the viewBox bottom (centreline 15.2 plus half the 1.6 stroke = 16.0), which puts the bar on the baseline with no offset to tune. The shaft and arrowhead moved up by the same amount to keep the proportions. download.test.js gained a geometry guard that parses the viewBox, stroke width and bar centreline out of the shipped markup and asserts the stroke bottom is flush with the box bottom. Re-insetting the bar to the original 13.5 fails it with the measurement (14.3 want 16), so a future edit that reintroduces the float is caught rather than eyeballed. Verified: download 29 checks, history 29, extremes 27, poll_spark 35, dashboard_test 241 over 8 cases, sched_test 62646 over 184, no failures. Not deployed. Goes to review with the separator and export commits. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI
This commit is contained in:
1 parent
c36d04d99c
commit
d537dc09aa
2 files changed
+14
-1
No files matched your search
@@ -1238,7 +1238,10 @@ nav button.on { color:var(--fg); background:var(--track); }
|
||||
<button type="button" class="pbtn" id="reqjson"
|
||||
title="Download JSON file" aria-label="Download JSON file">
|
||||
<svg width="12" height="12" viewBox="0 0 16 16" aria-hidden="true">
|
||||
<path d="M8 1.5v8m0 0L4.6 6.1M8 9.5l3.4-3.4M2.2 13.5h11.6"
|
||||
<!-- The tray bar's stroke bottom lands exactly on the viewBox
|
||||
bottom, so baseline alignment puts the bar on the text
|
||||
baseline. An inset bar floats a hair above the caps. -->
|
||||
<path d="M8 2v9m0 0L4.6 7.6M8 11l3.4-3.4M2.2 15.2h11.6"
|
||||
fill="none" stroke="currentColor" stroke-width="1.6"
|
||||
stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg></button></span>
|
||||
|
||||
Reference in new issue
Block a user