Repository navigation
docs: cut the social card down to what survives an unfurl - #187
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.
above the capital and below the baseline that "Quiet" does not fill. Set on
its own glyph extents instead.
more. 98 lines out, 42 in.
Validation
node scripts/check.mjs— 25 checks, passed. The palette check still covers thisfile; 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.