Typography & portable text
Everything below is authored in the Studio's portable-text editor and rendered through this project's serializers. It doubles as a visual regression check: if heading spacing or the type scale drifts, it shows up here first.
Rosterly sets every heading in Barlow Condensed — picked in Site Settings, not in code — and its theme.css turns them to heavy capitals with tight leading, like a match graphic. Long-form text, such as a blog post, keeps headings in sentence case: a whole article in capitals is shouting.
The heading scale
Headings carry no vertical margin of their own — spacing is owned by the .nuxion-flow wrapper the renderer emits, using adjacent-sibling rules. The gap above a heading is roughly three times the gap below it, so each heading reads as belonging to the text that follows rather than floating between two paragraphs.
A third-level heading
Because those margins are em-based, every level separates in proportion to its own size: an h2 breaks a page more strongly than an h3 without either being hand-tuned.
A fourth-level heading
The first block in any portable-text field never receives a top margin, which is what lets heroes and CTA banners render their title through this same system without being pushed down the page.
Fifth level
Sixth level
Note that on a blog post the whole scale steps down: 48px display headings suit a marketing section title, but sit far too large inside 18px body copy.
Decorators
Decorators are toggles applied to a text range — no configuration, no markDefs entry.
Bold, emphasis, underline, strikethrough, inline code, monospace, uppercase, light weight and extra bold. They compose, so text can be bold and monospaced at once.
Alignment
Alignment is also a decorator. This line is centred.
And this one is aligned right.
Annotations
Annotations attach data to a range, so each one stores an entry in the block's markDefs and the span references it by key.
Heading style
The heading annotation renders an inline heading inside a paragraph — a span, not a real h-tag. It picks up the heading type scale but not the vertical rhythm, because vertical margins don't apply to inline elements.
Font size and text style
Font size is set per range: this text is larger than its neighbours.
Line height and spacing belong to the whole block, not to a range: a Text Block's Text style picks a preset — Lead for opening copy, Compact for cards, Long-form for articles — and its headings and paragraphs take the same sizes and gaps a block built from plain heading and description fields gets on that preset.
This is a Muted paragraph, picked from the style menu like a heading. It is secondary copy — an aside, a footnote, a caveat — tinted from the text colour, the same tint a block's plain description field gets, so a theme that retunes one retunes both. It keeps the preset's size and spacing.
Colour and links
Highlight recolours a range of text. Left on inherit, it takes the page or section theme accent — adjusted to stay readable, and switching with the light/dark toggle. Set to a picked colour, it uses a fixed palette swatch that stays the same in both schemes.
Links come in four flavours: external (opens in new tab), internal (resolved from the referenced page's slug, so it survives a rename), email and telephone.
Gradient text derives its colours from the active theme when set to inherit, so it recolours with the rest of the page.
Width and alignment constrains a range to a maximum width and aligns it — it renders a block-level span, so it reads as its own narrow column inside the wider text.
Quotes and lists
A good league is one where everyone still checks the table in April, including the manager in last place.
- Goals, assists and clean sheets score by position
- A second bullet, to show item spacing
- Set your line-up before the deadline
- Pick a captain for double points
- Bench boost, once a season
Code blocks
A fenced code block is its own type, so it can sit inside a rich-text field like this one or as a plain field on any schema that wants a snippet. Highlighting is resolved at build time and carries both colour schemes, so a block recolours with the site rather than staying dark on a light page. The inline code decorator above is a different thing entirely.
/* Rosterly restyles the shipped stats block as a scoreboard,
through a class the block publishes for themes. */
[data-nuxion-theme='rosterly'] .nuxion-stats__value {
font-family: var(--font-heading);
font-size: 5.5rem;
line-height: 0.9;
font-variant-numeric: tabular-nums;
}Set a block to "Use code colours" instead of "Inherit page theme" when the snippet should keep the standard dark code styling whatever the page around it is doing.
npm run dev:all # Nuxt on 3000, Studio on 3333
npm run test:run # unit + Nuxt tests
npm run generate # static buildYour league’s next season starts here
Set up a league in five minutes, invite your rivals with one link, and draft live on the night. Free for up to ten managers.