Skip to content

fix: malformed supporter SVGs — Boeing/Ribose invisible, NIST oversized - #58

Merged
ronaldtse merged 1 commit into
mainfrom
fix/supporter-svg-sizing
Sep 6, 2026
Merged

fix: malformed supporter SVGs — Boeing/Ribose invisible, NIST oversized#58
ronaldtse merged 1 commit into
mainfrom
fix/supporter-svg-sizing

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

Fixes the invisible Boeing/Ribose logos and the oversized NIST logo.

Why: an <img>-embedded SVG needs both a viewBox (so the content scales) and explicit width/height (so layout has an intrinsic size). The supporter assets violated this in both directions:

file had symptom
supporter-boeing.svg viewBox only no intrinsic size → collapsed to nothing under w-auto + height cap
supporter-ribose.svg viewBox only same — invisible
supporter-nist.svg width/height only content cannot scale → rendered oversized
supporter-ge.svg width/height only latent same-as-NIST (happened to display)

All four now carry both. Logo strips (home + /supporters) also use a definite h-10 instead of max-h-10 so every logo renders at the same height deterministically.

Guard: scripts/assets.test.ts — every SVG in public/images/supporters/ must have a viewBox and explicit width/height; runs in CI via npm test (14 tests total, all green).

boeing/ribose shipped viewBox-only SVGs (no intrinsic width/height), so
the logos collapsed to nothing under w-auto + height caps; nist shipped
width/height without a viewBox, so its content could not scale and
rendered oversized (ge had the same latent problem). Give all four both
a viewBox and explicit dimensions, and set a definite h-10 on the logo
strips so every logo renders at the same height.

scripts/assets.test.ts guards the invariant: every supporter SVG must
carry a viewBox and explicit width/height.
@ronaldtse
ronaldtse merged commit 3e3b083 into main Sep 6, 2026
3 checks passed
@ronaldtse
ronaldtse deleted the fix/supporter-svg-sizing branch September 6, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant