Skip to content

feat(engine): theme-resolved fonts + overline / object-position / scrollbar track (1.0.3)#42

Merged
SiphoChris merged 1 commit into
mainfrom
feat/theme-fonts-and-loose-thread
Jun 10, 2026
Merged

feat(engine): theme-resolved fonts + overline / object-position / scrollbar track (1.0.3)#42
SiphoChris merged 1 commit into
mainfrom
feat/theme-fonts-and-loose-thread

Conversation

@SiphoChris

Copy link
Copy Markdown
Owner

Theme fonts that actually apply + three cheap addons (1.0.3)

The fonts fix (the main thing)

A generated theme.dart names fonts (sans: 'Outfit', …) but, before this, nothing used them.fontSans was hardwired to generic 'sans-serif' and the engine never applied typography.sans. So colors/radii/shadows reskinned from a pasted theme, but fonts didn't. Closed:

  • fontSans/fontSerif/fontMono resolve to the active theme's families at build (new FwFontStep, mirroring the roundedMd/shadowMd token-step mechanism). font('Family') stays a literal override; mixing a role + literal in one chain asserts.
  • FwTheme applies the theme's sans as the subtree's default text family (merged, family-only → golden-safe; verified the test harness registers no font so rendering is unchanged). The interop path keeps using the host MaterialApp text theme.
  • Registration stays the dev's job (the engine bundles no fonts). New Fonts docs page covers bundle vs google_fonts, and the generator's emitted comment now says you only register (the engine applies).

Loose-thread addons (cleared in the same version, as requested)

  • overline — Tailwind overline decoration, combines with underline/line-through.
  • fit(BoxFit, {alignment}) — Tailwind object-{position}FittedBox.alignment (directional).
  • FwScroll(trackColor:) — Tailwind scrollbar-color track (a track implies a visible thumb).

Audit / realign / cleanup (post-change)

  • +10 tests → 462 total, analyze + format clean (engine and example); docs 167 vitest pass.
  • Realigned drift: the generator emitter comment, its test, the FwFontFamily doc, the FwStyle override-only list, coverage.mdx, typography/effects-filters/layout pages, and the roadmap (the three marked built; font row notes theme-resolution).
  • dart pub publish --dry-run1.0.3, no warnings (besides the pre-commit git note). Example demos overline.

Behaviour change is registration-only; existing apps are unaffected (stock themes use sans-serif, identical to before). Auto-deploys on merge.

🤖 Generated with Claude Code

…ollbar track (1.0.3)

Fonts now actually apply from a pasted/generated theme — the gap where the
theme's font names round-tripped but nothing used them is closed:
- `fontSans`/`fontSerif`/`fontMono` resolve to the active theme's families at
  build (a new FwFontStep, mirroring the radius/shadow token-step mechanism),
  instead of generic 'sans-serif'/'serif'/'monospace'.
- `FwTheme` applies the theme's `sans` family as the subtree's default text
  family (merged, family-only — golden-safe; the interop path keeps using the
  host's textTheme). `font('Family')` stays a literal override; mixing a role
  with a literal in one chain asserts.
- Registration stays the dev's job (engine bundles no fonts) — new **Fonts**
  docs page covers bundle vs google_fonts; the generator's emitted comment now
  says you only REGISTER (the engine applies).

Loose-thread cheap addons, shipped in the same version:
- `overline` (Tailwind `overline` text-decoration), combines with the others.
- `fit(BoxFit, {alignment})` (Tailwind `object-{position}`) → FittedBox.alignment.
- `FwScroll(trackColor:)` (Tailwind `scrollbar-color` track; implies a visible thumb).

+10 tests (462 total). Docs: Fonts page + typography/effects/layout/coverage
updates; roadmap marks the three as built; example demos `overline`. Bump to
1.0.3 (registration-only behaviour change; existing themes unaffected).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flutterbits Ready Ready Preview, Comment Jun 10, 2026 1:32pm

@SiphoChris SiphoChris merged commit e814ab0 into main Jun 10, 2026
7 checks passed
@SiphoChris SiphoChris deleted the feat/theme-fonts-and-loose-thread branch June 10, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant