All guides

Type Size and Contrast for Social Cards Made from Markdown

Published

Use the editor's real type scale, template colors, and phone-width arithmetic to keep a text card readable after a feed shrinks it.

Steps

  1. Write the short version first. One heading and a few lines. Type size cannot rescue a full article on one card.
  2. Stay near the default 36px until the preview is calm. Move between 24 and 56 only to fix a wrap or a heading that dominates the card.
  3. Pick a template whose text is obviously light-on-dark or dark-on-light. Check comments and the signature. Do not add a low-opacity mark on top of the last line.
  4. View the export at column width. A 1080px file shown near 360px wide displays type at about one third of its pixel size. Read the smallest words there.

The feed will shrink the file

You design the card at its export size: 1080, 1200, or 900 pixels across, depending on the preset. Almost nobody will see it at that width. A phone column is often closer to a third of a 1080-pixel square. The ratio is ordinary arithmetic, not a measurement of a particular app. If the column is about 360 pixels wide, every glyph is drawn at about one third of its file size. A 36px body becomes about 12px on that screen. A heading at 1.9 times the body, the editor's heading scale, becomes about 68px in the file and about 23px on that screen. A code block at 0.7 times the body becomes about 25px in the file and about 8px on that screen.

Those on-screen sizes are why "it looks fine full screen on my laptop" is not a review. Open the downloaded file and zoom the window until the image is about as wide as a post column, or just hold the phone preview up and read the smallest label you care about. If you cannot read it, cut words or raise the type. Do not add another sentence in a smaller size. The size guide picks the canvas. This page is about what happens to the letters after that choice.

What you can actually change

The font-size control runs from 24 to 56 and starts at 36. Padding runs from 36 to 110 and starts at 64. There is no font menu and no font upload. Body copy uses a sans stack aimed at Avenir Next, SF Pro, Segoe UI, and the system UI font, in that order, then a generic sans. Code uses a stack that names JetBrains Mono and then ui-monospace. The font file is not shipped with the site, so code looks like whatever monospace the browser already has unless that named face is installed locally. Two exports of the same note can wrap differently for that reason. Trust the preview on the machine you export from, and re-export if you move machines rather than assuming the PNG you made last week still matches the wrap.

Heading weight is heavy (800) and the heading line-height is tight (just over 1). Body line-height is 1.24. You cannot set those independently. A two-line heading at 56px will dominate a 630-pixel-tall Open Graph card and shove the supporting line toward the crop. Prefer a shorter heading over a smaller one. Six to ten words is a writing target for a link card, also used in the Open Graph guide, not a field limit.

Padding is the margin outside the inner surface. The inner card also has its own padding. If a word sits against the outer edge, increase padding or shorten the line before you shrink the type. Platform crops eat edges. A comfortable inset at export size is cheap insurance, and it costs you a line you probably did not need.

The templates are five fixed pairs

You do not pick a hex color. You pick one of the five templates on the template page.

  • Minimal is an off-white page (#f8fafc) with near-black text and a white inner card.
  • Newsletter is a warm paper (#f4f1ea) with near-black text and a lighter inner card.
  • Developer is a dark slate page (#121826) with light text and a slightly lifted inner panel.
  • Dark Code is nearer to black (#080b12) with a light cyan-tinted text color.
  • Launch Card is a deep green (#10231f) with a light emerald text color.

Light templates put dark text on a light surface. Dark templates put light text on a dark surface. That is the contrast strategy, and it is coarse on purpose. This page is not a contrast audit and it does not report ratios. Pale gray on white is not one of the options, which removes a common way to make a card look "subtle" and unreadable. You can still fail the eye test with syntax colors, with a signature, or with a heading so large that the supporting line is the only thing left in the crop.

On the light templates, code tokens are recolored to darker blue, green, and purple. On the dark templates they stay bright. A comment is the muted token in both palettes. If the comment is the point, it should be a heading, not a comment. Readable code images covers that choice.

Use Minimal or Newsletter for prose, quotes, and tables. Use Developer or Dark Code when a fence is the subject. Use Launch Card for a one-line announcement, not for a table. The green is a strong ground, and a dense grid on it looks louder than the information deserves. The examples pair each sample with a template for that reason: the quote sits on Minimal, the helper sits on Dark Code, the weekly list sits on Newsletter.

The signature is an overlay

The optional signature is not a footer in the flow of the text. It is painted at the bottom right of the inner card, at 18px and 30% opacity, on top of whatever is already there. A low-opacity word over a bullet is harder to read than either element alone, and it fails first for the last line of the card, which is often the line you most wanted. Leave the field empty unless you have looked at the corner and confirmed it is blank. The editor does not reserve space for the mark. There is also no forced watermark. Empty means empty.

Do not fake a logo by pasting a remote image into the Markdown unless you are sure the host allows the browser to read it. A blocked image cancels the export. A decorative image you do not need is one more thing that can collide with the type.

Color is not the only contrast

Size contrast matters as much as color contrast on a card this simple. The heading scale (about 1.9×) already separates the title from the body. You do not need bold body text, all-caps paragraphs, or a second heading level to create a hierarchy. Markdown will happily render three heading levels and a table on one square. The result is a poster where everything is emphasized, which means nothing is. One heading, then text.

Line length matters because the eye is tracking a short column, not a book page. A 1200-pixel landscape card can hold a long line at 36px and still be a poor read, because the line is a banner. Break the thought. Lists on these cards work when each item is one line. A list item that wraps three times is a paragraph wearing a bullet.

Dark mode in the surrounding site has nothing to do with the exported card. The card colors are the template, baked into the pixels. Someone viewing X in dark mode still sees your off-white Minimal card as off-white. You do not need a second export for their theme. You need the text on your card to be readable against your card.

A review that catches the real failures

Export PNG so you are judging the type and not JPEG ringing. Then:

  1. Set the image width to about a third of a 1080 or 1200 file, whatever you exported. Read the heading, then the smallest text you expect a stranger to read, which might be a table cell or a code token.
  2. Look at the bottom right. If a signature crosses a word, delete the signature or shorten the note until the corner is empty.
  3. Check the edges against the crop you expect. The Open Graph cache guide is about the file the crawler stores. The crop is about which of your pixels survive. Keep the heading in the middle band of a link card.
  4. If you are tempted to move from 36 to 24, delete a line instead and look again. Use 24 only when the card is a single heavy heading and the body is already gone.
  5. If two templates are both readable, pick the quieter one for a document-like note and the darker code template for a fence. Do not alternate templates inside one carousel. The sequence should look like one set. Where to split assumes a stable canvas for that reason.

None of this requires a brand system. The constraints are the slider, the five backgrounds, and the width of the column where the file will sit. A card that survives that check is usually short. Short is the feature.

Frequently asked questions

Can I upload my own font?
No. Body text uses the system sans stack. Code asks for JetBrains Mono and falls back to the browser monospace face. The site does not ship a font file.
What is the default type size?
36 pixels, on a slider from 24 to 56. Headings are drawn at about 1.9 times that size. Code is drawn at about 0.7 times that size.
Will a dark template pass a contrast audit?
This page does not claim an audit. The templates pair a light surface with near-black text or a dark surface with near-white text. You still have to look, especially at syntax colors, the optional signature, and any words that sit near the edge of a crop.
Should I drop the type size so more text fits?
Only after you have cut the text. The slider goes down to 24. A 24px heading that becomes about 8px on a phone column is rarely the right trade for a feed.

Try the tools