Skip to content

Prose ​

Add the ghost-prose class to an article and @ghostvue/themes styles the long-form HTML inside it: headings, paragraphs, lists, links, inline code, keys, code samples, quotes, tables, and media. There is no component and no JavaScript; prose styles the HTML you already have, such as the output of a markdown renderer or a CMS.

Release notes article

Plain article HTML with headings, nested lists, inline code, keys, a table, a code sample, and a quote, styled by the .ghost-prose class from @ghostvue/themes.

Ledger 2.4 release notes

This release adds bulk export, smarter payment retries, and a short upgrade path for self-hosted teams. Press Ctrl + E on any invoice list to open the new export dialog.

Highlights

  • Export up to 5,000 invoices at once with ledger export.
  • Failed card charges retry on a schedule:
    • after one day,
    • after three days, then
    • after a week, with an email to the customer.
  • Reports follow your fiscal year instead of the calendar year.
Changes by area
AreaChangeVersion
InvoicesBulk export to CSV2.4.0
PaymentsRetry failed card charges2.4.0
ReportsFiscal year start setting2.4.1

Self-hosted teams

Upgrade the worker before the web app, or retries pause until both run 2.4.

Upgrade

  1. Back up the database.
  2. Set LEDGER_EXPORT_LIMIT if you need a limit other than 5,000.
  3. Restart the worker so scheduled retries start.
docker compose pull ledger
docker compose up -d ledger worker

Retries never charge a card that a customer removed.

html
<article class="ghost-prose">
  <h1>Release notes</h1>
  <p>Install with <code>pnpm add @ghostvue/vue</code>.</p>
</article>

Prose ships in @ghostvue/themes/default.css, so an app that already imports @ghostvue/themes (or its default stylesheet) has it. On the opt-in path, add the recipe next to the base and one palette:

ts
import '@ghostvue/themes/tokens.css'
import '@ghostvue/themes/base.css'
import '@ghostvue/themes/recipes/prose.css'

Like every recipe, prose reads tokens from the nearest theme host (data-ghost-theme or .ghost-theme), so the article must sit inside one.

Covered elements ​

ElementsTreatment
The .ghost-prose elementSans family, --ghost-type-size-lg (15px, one step above component text), normal line height, --ghost-text-default. The first child has no top margin and the last child no bottom margin.
h1–h63xl, 2xl, xl, lg, lg, md sizes, semibold. h1–h3 are tight; h6 is muted. More space above than below, so a heading binds to the text after it.
p, ul, ol, dl, blockquote, pre, table, figure, hrVertical rhythm from --ghost-space-stack-*; adjacent blocks are --ghost-space-stack-md apart.
ul, ol, liLogical indentation, tighter nested lists, muted markers. ol keeps native numbering, start, and reversed. Task-list checkboxes (li > input[type=checkbox]) sit on the first line.
dl, dt, ddSemibold terms, indented descriptions.
a--ghost-text-primary, underlined, with the theme focus ring. Visited links are not restyled.
strong, b, small, mark, abbr[title], delToken weights and colors only. mark uses the warning status colors; abbr[title] keeps a dotted underline.
Inline code--ghost-type-family-mono at 0.875em on --ghost-surface-muted-bg. Long identifiers wrap (overflow-wrap: anywhere), so a phone never scrolls sideways.
kbdThe themed GhostKbd keycap at sm size in the mono family, for markdown that cannot render the component. <kbd><kbd>Ctrl</kbd>+<kbd>C</kbd></kbd> paints one cap per key.
Bare pre and pre > codeA code surface with border, radius, padding, and mono type; scrolls horizontally and stays left to right. No header, copy button, or fold.
blockquoteA strong border on the inline-start side, muted text. No quotation marks are added.
hrA hairline in --ghost-border-default.
table and its partsFull width, collapsed borders, row hairlines, semibold start-aligned headers, --ghost-space-inset-sm cell padding, muted caption above the table. Numeric columns are not guessed.
img, video, svg, figure, figcaptionMedia never exceeds the article width; captions are small and muted.

Every rule sits in the ghostvue-theme layer with zero specificity, so any rule of yours wins, even a bare element selector:

css
/* Beats the prose heading size without !important or extra classes. */
h2 {
  font-size: 1.5rem;
}

Components inside an article ​

Prose stops at any element with a data-part attribute. Every GhostVue component root carries one, so a GhostTable, GhostLink, GhostKbd, or any other component inside an article keeps its own recipe instead of picking up prose rules. This matters because @scope proximity would otherwise let a prose rule beat a component recipe on every element it reaches.

When a sample needs a title, a copy button, or folding, use GhostCodeBlock instead of a bare pre. It paints the same surface, border, and mono type, and keeps its own recipe inside an article.

Components that are direct children of the article (or of a themed wrapper that is a direct child) still get the same --ghost-space-stack-md block spacing as paragraphs, and nothing else.

Markup from other libraries that uses its own data-part attributes, such as another headless library or icons, also stops prose. Put the class back on an element inside that markup if you want prose there.

Opt out with .ghost-not-prose ​

Add ghost-not-prose to any element inside an article to stop prose for that subtree, for example an embedded widget with its own typography. The paragraphs around it still space it.

html
<article class="ghost-prose">
  <p>Prose text.</p>
  <div class="ghost-not-prose">
    <h2>Styled by your own CSS</h2>
  </div>
</article>

Prose on or inside a component part ​

Putting ghost-prose directly on a component part, or on an element inside one, restores prose there. Use it for long text inside a disclosure, card, or scroll area:

vue
<GhostCollapsibleContent class="ghost-prose">
  <h2>Refund policy</h2>
  <p>Refunds go back to the original card within <strong>5 days</strong>.</p>
</GhostCollapsibleContent>

Themed collapsible and accordion content, and tree groups, wrap their content in an inner animation part. Prose continues into that GhostVue wrapper when the class is on the owning part. Any other data-part element inside the part, including another library's, and any other component still stops prose.

Density and color modes ​

Spacing reads --ghost-space-stack-* and --ghost-space-inset-*, so density tightens or loosens the rhythm. Type sizes do not change with density, matching how density treats text elsewhere. Colors read semantic tokens only, so light and dark mode, the system color scheme, and every defineTheme palette apply without extra CSS.

Set data-ghost-density on <html>, on the article, on a plain wrapper, or on a nested theme host (an element that also has .ghost-theme or data-ghost-theme), including while an ancestor sets data-ghost-mode.

In forced-colors mode the token mapping keeps text, links, and borders distinct; inline code keeps its mono family as the cue. Every inset, indent, and border uses logical properties, so a dir="rtl" article mirrors; bare pre stays left to right.

Layout recipes ​

Line length ​

Prose sets no maximum width; line length is your layout decision. About 70 characters reads comfortably:

css
.article {
  max-inline-size: 70ch;
}

Headings under a sticky header ​

Headings set scroll-margin-block-start from --ghost-prose-scroll-margin (default 0), so links to #heading ids do not land under a sticky header. Set it once on the article or an ancestor:

css
.ghost-prose {
  --ghost-prose-scroll-margin: 4rem;
}

Wide tables ​

A wide table widens the article unless you wrap it. Wrap it in a GhostScrollArea, which keeps its own recipe, gets block spacing like any embedded component, and gives keyboard users a named scroll region:

vue
<article class="ghost-prose">
  <GhostScrollArea label="Plan comparison" orientation="horizontal">
    <table>
      <!-- … -->
    </table>
  </GhostScrollArea>
</article>

The scroll area is a component root, so the table inside it is no longer styled by prose. Put ghost-prose on the scroll area as well (<GhostScrollArea class="ghost-prose" …>) to keep prose table styling inside it.

Code face ​

Inline code, bare pre, and kbd read --ghost-type-family-mono. Override it on the palette host to change the code face. defineTheme's fontFamily does not set it, and it is unrelated to the mono flagship theme:

css
:root {
  --ghost-type-family-mono: 'JetBrains Mono', ui-monospace, monospace;
}