Skip to content

docs: cut the social card down to what survives an unfurl - #187

Merged
isaacslee merged 1 commit into
mainfrom
docs/social-card-legible
Aug 5, 2026
Merged

isaacslee merged 1 commit into
mainfrom
docs/social-card-legible

Conversation

@isaacslee

Copy link
Copy Markdown
Member

The card carried an eyebrow, a two-line sentence and the repository URL. None of
it is legible where the card is actually seen.

An unfurled link shows the image around 360px wide — a third of the 1280 it is
drawn at. At that reduction the 35px sentence lands at 10px and the 25px URL at
7px. Twitter's ~500px is not much better: 14px and 10px.

The sentence was redundant besides. Every platform that unfurls a link prints
the repository's title and description beside the image, as real text at the
reader's own size, from the page's own metadata. The picture was carrying a
worse copy of the line underneath it.

So the card is now the mark and the name, and nothing else.

Also fixed

  • Margins. The block was anchored to a fixed left inset, so the right margin
    was whatever the longest line happened to leave: 104 against 274. The pair is
    now centred as one object, on where its ink lands rather than on the advance
    width — which carries the side bearing past the last stem of the "t", 5px of
    it, spent on the right only. Measured after: 203 against 203, and 134
    against 134 vertically.
  • The name sat high. It was positioned by its line box, which carries space
    above the capital and below the baseline that "Quiet" does not fill. Set on
    its own glyph extents instead.
  • Dead code. Four palette entries and three helpers nothing draws with any
    more. 98 lines out, 42 in.

Validation

node scripts/check.mjs — 25 checks, passed. The palette check still covers this
file; it now declares two tokens instead of six.

Every number above was read back out of the rendered canvas, not computed from
the source: the margins by scanning for the first and last column that is not
paper.

- drop the eyebrow, the sentence and the url, leaving the mark and the
  name
- a card is shown around 360px wide when a link unfurls, a third of what
  is drawn: the 35px sentence landed at 10px and the 25px url at 7px,
  neither of which is text any more
- the sentence was also a worse copy of one the reader already has, since
  every platform prints the repository's own description beside the image
  as real text
- centre the pair as one object on where its ink lands, not on the
  advance width, which spent its side bearing on the right margin alone;
  measured, 203 against 203 where it had been 104 against 274
- set the name on its glyphs rather than its line box, which held it
  visibly high against the mark
- drop the four palette entries and three helpers nothing draws with now
Copilot AI lite review requested due to automatic review settings August 5, 2026 22:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@isaacslee
isaacslee merged commit 1b069d5 into main Aug 5, 2026
1 check passed
@isaacslee
isaacslee deleted the docs/social-card-legible branch August 5, 2026 22:50
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.

2 participants