Guide
Typography
Weini defines typography in its shared theme. The same sizes, line heights, weights, and text roles work in your app, the components you install, and these docs.
Install the type system
Import the Weini foundation after Tailwind. base.css provides the scale and roles; default.css provides the font fallbacks and colors. Add nebula-font.css if you want the bundled Nebula Sans faces.
@import "tailwindcss";
@import "@getweini/vue/styles/base.css";
@import "@getweini/vue/styles/default.css";
@import "@getweini/vue/styles/nebula-font.css"; /* optional */The scale belongs to @getweini/vue, so it is available wherever the Weini theme is imported. Changing a docs class alone does not change installed components.
Use text roles
Start with a role for page content. Roles include their size, line height, and weight. Display and section roles also set tighter tracking. The fluid roles adjust between mobile and desktop widths without a separate breakpoint class.
text-display-heroclamp(3.5rem, 16vw, 6rem)Landing page herotext-displayclamp(2.25rem, 4vw, 3.5rem)Page titletext-section-titleclamp(2rem, 3vw, 2.5rem)Major section titletext-card-title1.25remCard and subsection titletext-body-lg1.0625remShort introductiontext-body1remMain reading copytext-body-sm0.9375remCompact reading copytext-caption0.8125remSupporting detailtext-label0.75remShort uppercase labelPage title
A clearer starting point
Section title
Build with confidence
Reading copy
One steady body size makes a page easier to read.
A quieter supporting detail.
<template>
<p class="text-label uppercase">Getting started</p>
<h1 class="font-display text-display">Build with Weini</h1>
<p class="text-body">Readable copy for the main content.</p>
<p class="text-caption text-muted-foreground">Updated today</p>
<button class="text-sm font-medium">Continue</button>
</template>Use text-body for ordinary reading. Reserve text-body-lg for short introductions; use text-caption and text-label only for brief supporting text. Pair heading roles with the matching semantic heading element.
Everyday size scale
The numbered Tailwind sizes are neutral building blocks. Each has a Weini line height, tracking, and normal 400 weight. A component can add font-medium or font-semibold without changing the shared size rule.
text-xs0.75rem1.5 lineShort metadata and dense controlstext-sm0.875rem1.5 lineControls and navigationtext-base1rem1.5 lineDefault interface texttext-lg1.125rem1.55 lineEmphasized copytext-xl1.25rem1.4 lineSmall headingstext-2xl1.5rem1.3 lineSection headingstext-3xl1.875rem1.2 linePage headingstext-4xl2.25rem1.15 lineLarge headingstext-5xl3rem1.1 lineDisplay texttext-6xl3.75rem1.05 lineLarge display textA size class does not make text bold. Apply a weight when the content calls for emphasis. text-sm is 14px with a 21px line height and 400 weight by default.
Choose a weight
Use 400 for paragraphs, 500 for control labels that need a little emphasis, 600 for section headings, and 700 for strong display text. Nebula Sans also includes light (300) and black (900) faces when a product needs them.
Override a role
Standard Tailwind utilities can override a role's weight, line height, or tracking. Use responsive variants when content needs a different reading size on a narrow screen. Keep control labels aligned with the sm, md, and lg component size progression.
<template>
<h1 class="text-display">A page title</h1>
<p class="text-body-sm md:text-body">Responsive reading copy.</p>
<p class="text-sm font-semibold leading-relaxed">A stronger small label.</p>
</template>Change the font
--type-sans controls body text and controls, --type-display controls headings, and --type-mono controls code. Load your font first, then set the family variables after the theme imports.
/* Add below the Weini imports in your app CSS. */
:root {
--type-sans: Georgia, serif;
--type-display: Georgia, serif;
--type-mono: ui-monospace, monospace;
}Leave out @getweini/vue/styles/nebula-font.css when using another font. The older --weini-font-family override remains supported for the sans and display families.
Readability checks
Keep long reading passages at the body size, let lines wrap, and check the page at narrow widths and enlarged browser text. WCAG does not require a single default font size; it asks that text can grow to 200% and that content reflows without losing information.
Nebula Sans is distributed under the SIL Open Font License. The bundled license includes the required copyright notice.