Repository navigation
docs: use :root to override the default fonts in the v5 custom fonts guide - #93
jeltehomminga wants to merge 1 commit into
Conversation
|
@jeltehomminga is attempting to deploy a commit to the nativewind Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
🟢 Approval recommended
The focused documentation change reflects the reported native-platform workaround, with no identified blocking issues.
No open issues 🎉
What changed in this PR
Updates the v5 custom fonts guide to document a working override for default fonts on iOS and Android in the current release candidate.
Changes:
- Replaces
@themewith a:rootblock and instructs readers to place it after imports. - Explains why Nativewind’s platform defaults prevent the
@themeoverride from taking effect.
| File | Description |
|---|---|
content/v5/guides/custom-fonts.mdx |
Updates the default-font override example and explains the release-candidate limitation. |
Review effort: Balanced
|
Hi, a short follow-up on this one and on #94. Both are docs-only. The red Vercel check on each is the deploy authorization for fork PRs, which I can't clear from my side. This one still applies on 5.0.0-rc.1: nativewind/nativewind#1876 has the retest. I haven't rerun the checks behind #94 on rc.1. Happy to change or drop either one. |
The custom fonts guide overrides the default font with
@theme { --font-sans: ... }, but in 5.0.0-rc.0 that has no effect on iOS and Android, see nativewind/nativewind#1876. A:rootblock after the imports works on both, so this switches the example to that and adds one line on why.Checked with Courier in the repro from that issue, on an iOS 26.5 simulator and an Android 17 emulator:
font-sansresolves toCourierwith:root, and toSystem/SystemAndroidwith@theme. I didn't check web.If the issue gets a code fix, this is easy to revert, or I can drop the last sentence.
pnpm test:llmandpnpm buildpass.