Skip to content

feat(web): give the tab icon a background and generate the brand rasters - #86

Merged
yashranaway merged 1 commit into
mainfrom
t3code/brand-icons
Aug 5, 2026
Merged

feat(web): give the tab icon a background and generate the brand rasters#86
yashranaway merged 1 commit into
mainfrom
t3code/brand-icons

Conversation

@yashranaway

Copy link
Copy Markdown
Collaborator

There is a Headless logo already — a viewfinder, four corner brackets around empty space, "a frame with no chrome". It exists twice with identical geometry: apps/web/public/headless-mark.svg and apps/headless/tools/make-icon.swift (the macOS .icns). Nothing needed inventing; it needed wiring up properly.

The favicon was broken in a quiet way

metadata.icons pointed at public/headless-mark.svg. That file is stroke-only and takes its colour from a prefers-color-scheme block inside the SVG. Browsers do not reliably re-evaluate that for tab icons, so the near-black #15171a stroke can render nearly invisible against a dark tab strip.

The macOS app icon had already solved this — dark squircle, light mark. app/icon.svg now does the same, so tab and app icon match.

The bare mark is untouched on purpose: the nav brand renders it as a CSS mask and takes its colour from currentColor, so giving it a background would break the header.

Added

app/icon.svg Tab icon — mark on the dark squircle
app/apple-icon.tsx 180×180 touch icon, generated via next/og
app/opengraph-image.tsx 1200×630 social card — the site had no og:image at all
scripts/render-brand.mjs GitHub avatar + social preview → gitignored build/brand/
docs/brand.md Geometry, where each asset lives, upload steps

Also adds the metadataBase, openGraph, and twitter metadata that were missing (part of #49).

No binaries are committed. Every raster comes from code, so the media policy holds and any size can be regenerated without a design tool.

Detail worth keeping

Generated images draw each bracket as two rounded bars, not a div with two borders. Bordered boxes miter at the corner and leave a visible diagonal seam, and they cannot reproduce the round line caps of the source path. I rendered it both ways and compared before settling on this.

Verified locally

next build and eslint pass; /icon.svg, /apple-icon, and /opengraph-image all emit. I inspected the generated PNGs visually — 180×180 and 1200×630, correct geometry, correct caps.

Needs you: GitHub uploads

GitHub has no API for either of these, so I cannot do them — and note that repositories have no icon of their own, they display the owner's avatar.

pnpm --filter @headless/web brand
  1. apps/web/build/brand/avatar-512.pnghttps://github.com/organizations/LockInTime/settings/profile
  2. apps/web/build/brand/social-preview-1280x640.png → repo Settings → General → Social preview

Both are already rendered on this machine at those paths.

The favicon pointed at public/headless-mark.svg, which is stroke-only and takes
its colour from a prefers-color-scheme block inside the file. Browsers do not
reliably re-evaluate that for tab icons, so a near-black #15171a stroke can
disappear against a dark tab strip. The macOS app icon had already solved this
by putting the mark on a dark squircle; app/icon.svg now does the same, so the
two platforms match.

The bare mark stays exactly where it is: the nav brand uses it as a CSS mask and
takes its colour from currentColor, so it must remain background-free.

Adds the raster sizes that were missing — an Apple touch icon and a 1200x630
social card — generated at build time through next/og rather than committed as
binaries, plus the openGraph and twitter metadata and the metadataBase that
were absent.

scripts/render-brand.mjs renders the two square images GitHub needs, an
organisation avatar and a repository social preview, into a gitignored
build/brand/. GitHub has no API for either upload, so they are generated on
demand and uploaded by hand.

Generated images draw each bracket as two rounded bars rather than a bordered
box: bordered boxes miter at the corner and leave a visible seam, and cannot
reproduce the round line caps the mark is drawn with.

docs/brand.md records the geometry, where each asset lives, and the upload
steps.
@yashranaway
yashranaway requested a review from SarthakWade August 5, 2026 20:27
@yashranaway
yashranaway merged commit f40be50 into main Aug 5, 2026
7 checks passed
@yashranaway
yashranaway deleted the t3code/brand-icons branch August 5, 2026 20:29
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