feat(engine): theme-resolved fonts + overline / object-position / scrollbar track (1.0.3)#42
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Theme fonts that actually apply + three cheap addons (1.0.3)
The fonts fix (the main thing)
A generated
theme.dartnames fonts (sans: 'Outfit', …) but, before this, nothing used them —.fontSanswas hardwired to generic'sans-serif'and the engine never appliedtypography.sans. So colors/radii/shadows reskinned from a pasted theme, but fonts didn't. Closed:fontSans/fontSerif/fontMonoresolve to the active theme's families at build (newFwFontStep, mirroring theroundedMd/shadowMdtoken-step mechanism).font('Family')stays a literal override; mixing a role + literal in one chain asserts.FwThemeapplies the theme'ssansas 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 hostMaterialApptext theme.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— Tailwindoverlinedecoration, combines with underline/line-through.fit(BoxFit, {alignment})— Tailwindobject-{position}→FittedBox.alignment(directional).FwScroll(trackColor:)— Tailwindscrollbar-colortrack (a track implies a visible thumb).Audit / realign / cleanup (post-change)
FwFontFamilydoc, theFwStyleoverride-only list,coverage.mdx,typography/effects-filters/layoutpages, and the roadmap (the three marked built; font row notes theme-resolution).dart pub publish --dry-run→ 1.0.3, no warnings (besides the pre-commit git note). Example demosoverline.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