A UI inspired by Swiss design

Blog

Text at a measure, pictures at the page

A post keeps its text to a reading measure. A gallery or a video keeps the text's left edge and runs on to the width of the page.

A line of text is easiest to read at about 60 to 75 characters. That is why a post keeps to a measure of 42rem, flush left, however wide the screen is. Pictures don’t have that limit. A row of artwork squeezed into a column of text gives each image less room than it needs.

So a post written in MDX can hold blocks of two widths. Text, lists, quotes and code stay at the measure. A wide block keeps the same left edge and runs on to the width of the page.

A Gallery placed in a post needs no wrapper: it takes the page’s width. These are rows, so the bottom edges line up across each row.

The text picks up again at the measure, on the same left edge, so the eye returns to the line it left.

Or keeps to the text

With width="text", a gallery stays inside the measure. That suits two or three images that belong to one paragraph.

A figure keeps to the text

A single figure stays at the measure, like the text around it. The kit’s usual rules hold: the image is a plain rectangle, shown whole, and its caption sits below in small muted text. To run a figure, a table or a card grid out to the page’s width, wrap it in a PostWide.

A hut with an orange roof and a white cross on a russet ridge, below a snowy mountain.
Hut on the ridge

Video from YouTube or Vimeo

A VideoEmbed takes the address you’d share and a title for screen readers. Like a gallery, it fills the page’s width, and it loads only as it nears the screen. Nothing plays until the reader presses play. YouTube comes from its no-cookie address and Vimeo with Do Not Track on, so neither sets a tracking cookie before then.

Creatures of Habit, directed by Nate Laverty, 2025. From YouTube.

With width="text", a video keeps to the measure instead, like a picture in the text.

The same film from Vimeo, at the text's width.

A player is 16:9 unless it’s told otherwise. This film is a little wider, 2048 by 1080, so the YouTube player takes ratio={2048 / 1080}. Vimeo shows the film’s poster at the poster’s own shape, 2:1, with black around it in a player of any other shape, so the Vimeo player takes ratio={2}: the poster then fills it, and the film plays with a thin black edge at each side.

Every wide block sits on the same left edge as the text. Nothing is centered on its own, so the page keeps one strong vertical line from top to bottom.

Pointing to another post

A PostCard points to another post from inside this one. It takes the post’s file name, and finds its title, summary, date and cover itself, so the card stays right when the post changes. It keeps to the measure, and only its title is a link.

Related post

Images are content, not filler

A photo earns its place by showing the thing the page is about. Mood shots, textures and text set on pictures don't.

· Images · 1 min read

Read next

Notes on vermilion and azure

The kit offers two accents, one warm and one cool. Why each one, and why a site only ever uses one of them.

· Color · 1 min read