Base

Typography

Fluid responsive typography system using clamp() for seamless scaling

Headings

  • h1: clamp(2rem, 1.5rem + 2vw, 3rem), 32px → 48px, line height 1.2
  • h2: clamp(1.75rem, 1.5rem + 1.25vw, 2.25rem), 28px → 36px, line height 1.25
  • h3: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem), 24px → 30px, line height 1.3
  • h4: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem), 20px → 24px, line height 1.3
  • h5: 1.125rem (fixed), 18px, line height 1.4
  • h6: 1rem (fixed), 16px, line height 1.4

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Body text

  • Paragraph: clamp(1rem, 0.95rem + 0.25vw, 1.125rem), 16px → 18px, line height 1.6

Paragraph

The quick brown fox jumps over the lazy dog. This is a sample paragraph to demonstrate the fluid typography system. The font size scales smoothly between viewport widths, eliminating the awkward jumps that occur with traditional breakpoint-based responsive design. This approach ensures optimal readability across all screen sizes.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Paragraph with Link

This paragraph contains a standard link element that demonstrates the hover state with underline and color transition. Links are styled globally to maintain consistency across the entire site.

Lists

Unordered List

  • First item with sufficient text to wrap
  • Second item in the list
  • Third item demonstrating list style
  • Fourth item with more content to show line height behavior
  • Fifth item completing the example

Ordered List

  1. First step in the process
  2. Second step with description
  3. Third step demonstrating sequence
  4. Fourth step in the ordered list
  5. Fifth and final step

Font families

Title Font (Outfit)

The quick brown fox jumps over the lazy dog. 0123456789

Subtitle Font (Outfit)

The quick brown fox jumps over the lazy dog. 0123456789

Body Font (Outfit)

The quick brown fox jumps over the lazy dog. 0123456789

Quote Font (Instrument Serif)

The quick brown fox jumps over the lazy dog. 0123456789

font-families
<div>
  <h3>Title Font (Outfit)</h3>
  <p class="font-title text-2xl">The quick brown fox jumps over the lazy dog. 0123456789</p>

  <h3>Subtitle Font (Outfit)</h3>
  <p class="font-subtitle text-2xl">The quick brown fox jumps over the lazy dog. 0123456789</p>

  <h3>Body Font (Outfit)</h3>
  <p class="font-body text-2xl">The quick brown fox jumps over the lazy dog. 0123456789</p>

  <h3>Quote Font (Instrument Serif)</h3>
  <p class="font-quote text-3xl">The quick brown fox jumps over the lazy dog. 0123456789</p>
</div>

Content sample

The global element styles below apply anywhere. Markdown bodies in the entry layouts use prose from @tailwindcss/typography instead, coloured from the same tokens: see PostLayout.

The Importance of Typography in Web Design

Typography is one of the most critical aspects of web design. It affects not only the aesthetic appeal of your website but also its usability and accessibility. Good typography enhances readability, establishes hierarchy, and creates a pleasant reading experience.

Key Principles

When implementing typography systems, consider these fundamental principles:

  • Maintain consistent line heights for comfortable reading
  • Use fluid scaling to adapt to different viewport sizes
  • Establish clear visual hierarchy through size and weight
  • Ensure sufficient contrast between text and background
  • Optimize line length for readability (45-75 characters)

Responsive Typography

Modern web design demands responsive typography that adapts seamlessly to various screen sizes. Traditional media query breakpoints create abrupt size changes, while fluid typography using CSSclamp() provides smooth scaling across all viewport widths.

Good typography makes the reading experience effortless and enjoyable, allowing content to speak for itself without distraction.
Implementation Details

The typography system on this page uses the following approach:

  1. Base font size scales from 16px to 18px using clamp()
  2. Headings scale proportionally with viewport width
  3. Line heights are optimized for each text element
  4. Font families are assigned semantic roles (title, body, quote)
Testing Different Viewports

Resize your browser window to see how the typography scales smoothly without any abrupt jumps. The fluid system ensures optimal readability at every size, from mobile devices at 320px width to large desktop displays at 1920px and beyond.

Text alignment

Left Aligned (Default)

This paragraph demonstrates left alignment, which is the default for body text in most languages that read from left to right. It provides the most natural reading experience.

Center Aligned

This paragraph demonstrates center alignment, often used for headlines, taglines, or decorative text. Use sparingly for body content as it reduces readability.

Right Aligned

This paragraph demonstrates right alignment, less common in Western languages but useful for specific design contexts or languages that read from right to left.

text-alignment
<div>
  <h3>Left Aligned (Default)</h3>
  <p class="text-left">
    This paragraph demonstrates left alignment, which is the default for body text in most languages
    that read from left to right. It provides the most natural reading experience.
  </p>

  <h3>Center Aligned</h3>
  <p class="text-center">
    This paragraph demonstrates center alignment, often used for headlines, taglines, or decorative
    text. Use sparingly for body content as it reduces readability.
  </p>

  <h3>Right Aligned</h3>
  <p class="text-right">
    This paragraph demonstrates right alignment, less common in Western languages but useful for
    specific design contexts or languages that read from right to left.
  </p>
</div>