Skip to content

Add Cowork-inspired font defaults with sans/serif/mono tokens - #11

Merged
ntucker merged 5 commits into
mainfrom
cowork-font-defaults
Jul 26, 2026
Merged

Add Cowork-inspired font defaults with sans/serif/mono tokens#11
ntucker merged 5 commits into
mainfrom
cowork-font-defaults

Conversation

@ntucker

@ntucker ntucker commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Promote font families to first-class sans / serif / mono semantic tokens; typography roles reference them by name, and CSS emits --silk-font-* with indirect --silk-typography-*-family vars
  • Default stacks lead with Inter, Source Serif 4, and JetBrains Mono (headingLg / headingXl use serif); Silk still ships no font files
  • Load the variable fonts in Storybook/docs only; document setup in Theming and note Stage 7 init that can install them with an opt-out

Test plan

  • yarn test (silk-core + silk + native-spike smoke)
  • yarn test:perf and yarn test:packed
  • Open Storybook → Theme/TokenAudit → FontFamilies and confirm Inter / Source Serif 4 / JetBrains Mono render
  • Confirm a consumer without @fontsource-variable/* still falls through to system faces
  • Override via createTheme({ semantic: { fontFamily: { sans: '…' } } }) and confirm all sans roles retarget

Made with Cursor

Promote font families to first-class semantic tokens so tenants can retarget stacks once, and use Inter / Source Serif 4 / JetBrains Mono as open defaults (docs load them; the library still ships no font files).

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5a79d61

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@reactive/silk-core Minor
@reactive/silk Minor
@reactive/silk-docs Patch
@reactive/silk-native-spike Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

headingLg is the section/panel size used across fixtures and composites; Cowork-style serif belongs on display titles only.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ntucker

ntucker commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up: serif is now only on headingXl (page/display H1). headingLg stays sans so panel/section headers (InspectorPanel, SettingsForm, EmptyState, etc.) don't pick up Source Serif 4.

ntucker and others added 3 commits July 26, 2026 15:15
Watch-build core beside docs, and apply createTheme() as inline CSS vars in the preview decorator so light/dark stories pick up dist rebuilds without fighting Linaria's namedThemes extract cache.

Co-authored-by: Cursor <cursoragent@cursor.com>
Level 1 already defaults to headingXl (serif); the explicit size=\"lg\" was forcing a panel-scale sans title.

Co-authored-by: Cursor <cursoragent@cursor.com>
`yarn docs` hand-rolled child tracking, SIGTERM fan-out, and a shutdown
re-entrancy guard that `concurrently -k -s first` already handles for the same
two-process shape in apps/docs/scripts/test-storybook-ci.mjs. The preview
decorator also built a fresh theme per story render, which defeated
themeToCssVars' identity cache and every useMemo in ThemeProvider.

Also widen the native-spike platform-default guard to the full set of CSS
generic families: it only knew ui-sans-serif and system-ui, which was complete
before the serif and mono stacks existed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ntucker
ntucker merged commit b4fd11a into main Jul 26, 2026
3 checks passed
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