Skip to content

Documentation request: Clarify how to set a global default font in Tailwind CSS v4 #2455

@miriushchenko-decimadigital

Description

In Tailwind CSS v4, it's unclear how to set a custom font as the default for the entire site.
The docs explain how to create custom font utilities (--font-*), but they don’t clarify:

  • That --default-font-family exists and references var(--font-sans) internally
  • The relationship between --font-sans, --default-font-family, and the preflight html, :host rule

Setting a global font is a common first step in any project, yet there’s no explicit guidance.

Reference discussion: tailwindlabs/tailwindcss#19535

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions