astryx icon indicating copy to clipboard operation
astryx copied to clipboard

[Bug] Neutral theme is described as system-font based but declares unloaded Figtree

Open josephfarina opened this issue 3 months ago • 1 comments

Description

@astryxdesign/[email protected] advertises itself as using “system fonts,” but its published theme sets both body and heading typography to Figtree.

Figtree is not bundled and the theme does not load it. In a clean Vite + React 19 app, the browser silently falls back to the system font.

This is especially confusing because the generated astryx docs theme output describes Neutral as:

Muted, minimal aesthetic with system fonts. A good starting point.

The published theme source instead declares:

typography: {
  body: { family: 'Figtree', fallbacks: '...' },
  heading: { family: 'Figtree', fallbacks: '...' },
}

astryx docs typography correctly says Astryx does not load font files and that apps must do so. The Theme docs’ Neutral description contradicts that behavior and gives no Neutral-specific loading snippet.

This is related to #5015, but it is a remaining documentation/package-description mismatch in the released theme.

Reproduction

  1. Create a Vite React 19 app.
  2. Install @astryxdesign/[email protected] and @astryxdesign/[email protected].
  3. Import the prebuilt CSS and wrap the app with the documented provider:
import {Theme} from '@astryxdesign/core/theme';
import {neutralTheme} from '@astryxdesign/theme-neutral/built';
import '@astryxdesign/core/reset.css';
import '@astryxdesign/core/astryx.css';
import '@astryxdesign/theme-neutral/theme.css';

<Theme theme={neutralTheme}>
  <Heading level={1}>Test</Heading>
</Theme>
  1. Inspect the heading in a clean browser profile.

Observed:

  • Computed font stack: Figtree, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif
  • No .woff, .woff2, .ttf, .otf, Google Fonts, or Google Fonts static resource is requested.
  • The published package contains no font files.
  • Text therefore renders in the system fallback, not Figtree.

Expected behavior

Either:

  1. Describe Neutral as a Figtree theme and provide the exact consumer-side font-loading snippet, or
  2. Change Neutral to use only the documented system stack.

The current “system fonts” description makes a missing Figtree font look like an integration failure.

Astryx version

Environment

  • Vite 8.2.2
  • React 19.2.8
  • Chrome (clean local profile)
  • macOS 15.7.4, Apple Silicon

josephfarina avatar Sep 03 '26 21:09 josephfarina

Revised after reading #5047 — that experiment settles the (1) vs (2) question better than my first comment did.

The vibe test found all nine authored themes named a webfont with no loader, which is what filed #5015. More to the point, arm C's guidance warned about unloaded webfonts without an adjacent recipe, and two of three authors responded by dropping to system stacks. The editorial theme landed on bare Georgia, which the judge called "exactly every other content site, the one thing the editor forbade" — last of three on that brief. The conclusion recorded there: "a warning about a risk, with no adjacent recipe for taking the risk safely, reads as don't take it," and what ships should "enable rather than deter."

That shipped in #5048. packages/cli/assets/theme.template.ts §2 now reads "SHIP THE FONTS YOU NAME ... so use whatever typeface the design needs and load it yourself," with the <link> and @font-face inline.

So (2) is the direction that experiment measured and moved away from, and I'd rather not walk Neutral into it. Going with (1).

Three places in the repo already assume Figtree for Neutral:

  • packages/cli/assets/cdn.template.html ships the Google Fonts <link> and comments that "neutral asks for Figtree".
  • apps/sandbox/src/app/layout.tsx loads Figtree first in its font URL.
  • packages/themes/stone/README.md names its fonts explicitly ("Montserrat for headings, Figtree for body text") — the convention Neutral's README is missing.

And theme build already warns that neutral name(#5045's expected side effect), so the tooling and the description currently disagree.

Concretely, I'd change:

  • packages/themes/neutral/README.md — replace "e Stone-style font line.
  • packages/cli/assets/docs/theme.doc.mjs — the table row for Neutral.
  • Add a Neutral-specific loading snippet, following so the docs enable rather than deter.

I'd withdraw the open question from my earlier comment: whether a starting-point theme may require a webfont looks answered by #5047 and #5048. Say so if you read it differentl

Shall I open a PR?

kyu-rong avatar Sep 04 '26 07:09 kyu-rong