Skip to content

Give the SVG favicon an opaque square ground - #2

Merged
carstenb merged 1 commit into
masterfrom
fix-favicon
Sep 9, 2026
Merged

carstenb merged 1 commit into
masterfrom
fix-favicon

Conversation

@carstenb

@carstenb carstenb commented Sep 9, 2026

Copy link
Copy Markdown
Owner

The tab icon was invisible in browsers with a dark tab strip.

Cause

Two, both introduced when the SVG favicon was added:

  • carbo-logo.svg has no background. The mark is #1A1B1C, so on a dark tab strip a near-black shape on transparency disappears; only the light chin stayed visible. The handoff states this explicitly about the PNG icons ("the mark's negative space needs an opaque ground to read at small sizes") and the PNGs were generated that way. The SVG was not.
  • Its viewBox is 593x850, portrait. A favicon slot is square, so the mark was letterboxed and rendered smaller still.

Declaring the SVG first meant browsers preferred it over the perfectly good PNGs.

Fix

assets/favicon.svg: square 1000x1000, #FBFCFE ground, mark centred at 84%, matching the PNG icons. Verified side by side at 16/24/32/64px against dark and light grounds — the old asset is a dot at 16px on dark, the new one reads like the PNG reference.

carbo-logo.svg remains the header lockup, where transparent is correct because it sits on paper.

Dropping the C2PA metadata blob also took the icon from 39 KB to 31 KB.

Checks

Invariants, html-validate, linkinator (27 links), axe (4 pages, 0 violations), Lighthouse (9 runs, all assertions) all pass locally.

🤖 Generated with Claude Code

The tab icon was invisible in browsers with a dark tab strip. Two causes,
both mine:

- carbo-logo.svg has no background. The mark is #1A1B1C, so on a dark tab
  strip a near-black shape on transparency disappears; only the light chin
  stayed visible. The handoff says this explicitly about the PNG icons —
  "the mark's negative space needs an opaque ground to read at small
  sizes" — and the PNGs were built that way. The SVG was not.
- Its viewBox is 593x850, portrait. A favicon slot is square, so the mark
  was letterboxed and rendered smaller still.

Declaring it first meant browsers preferred it over the correct PNGs.

assets/favicon.svg is now a square 1000x1000 with a #FBFCFE ground and the
mark centred at 84%, matching the PNG icons. Compared side by side at
16/24/32/64px against both dark and light grounds before and after.

carbo-logo.svg stays the header lockup: transparent is right there, since
it sits on paper.

Dropping the C2PA metadata blob also took the icon from 39 KB to 31 KB.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@carstenb
carstenb merged commit 7d51135 into master Sep 9, 2026
2 checks passed
@carstenb
carstenb deleted the fix-favicon branch September 27, 2026 14:26
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