Bottom-aligned vertical type, and why the stagger matters

#css#typography

Rotate a row of labels into vertical type and the instinct is to align their tops. The result reads like a table of contents rotated ninety degrees.

Align the bottoms instead. Labels of different lengths then reach different heights, and the ragged top edge does the composing.

.rail-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.rail-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

The rotation is what makes the text read bottom-to-top. Without it, vertical-rl reads top-to-bottom, which puts the start of every label against the ceiling.