Repository navigation
feat(settings): Markdown font family and size - #1164
Open
probertson wants to merge 1 commit into
Open
probertson wants to merge 1 commit into
probertson wants to merge 1 commit into
Conversation
The rendered-Markdown views had hard-coded fonts (system sans 13px, Menlo 12px code, fixed-px headings). Settings → Appearance now has a Markdown font and a Markdown font size, applied to the ⌘M output view, the ⌘M chat view (thread and composer) and the editor's Markdown preview through CSS tokens App.tsx publishes on <html>. Code inside Markdown uses the terminal font family at 0.92 of the Markdown size; headings scale with the body size. Defaults reproduce the previous look. FontPicker gains an optional catalogue, stack builder and a "System font" row so it can pick proportional fonts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds Markdown font and Markdown font size to Settings → Appearance. Before, the rendered-Markdown views had hard-coded fonts (system sans at 13px, Menlo at 12px for code, fixed-pixel headings), and the only way to change them was UI scale, which zooms the whole app.
Where it applies: the ⌘M output view, the ⌘M chat view (thread and composer), and the editor's Markdown preview. The kanban card's file preview uses the same stylesheet class, so it follows too. Sticky notes are unchanged on purpose.
How it behaves
Implementation:
@shared/markdown-fontholds the defaults and resolvers (settings.json is hand-editable: a non-number size answers the default and is clamped; a family that is empty, too long, or contains;{}<>\or control characters answers the default).App.tsxpublishes--md-font-family,--md-font-sizeand--md-code-font-familyon<html>;styles.csskeeps the defaults on:rootand the Markdown rules read the tokens.FontPickergains optionalcatalog,buildStack,systemOptionandlabelprops; the terminal picker is unchanged. Both new keys are in the Appearance section reset.Surfaces: Desktop and Server Edition (renderer + settings.json only). Mobile: N/A (its chat view is native).
How it was checked
markdown-font.test.ts), a stylesheet pin that every Markdown rule reads the tokens and the:rootdefaults equal the setting defaults (styles.markdown-font.test.ts), the System font row (FontPicker.test.tsx), andbuildProseFontStack.npm run typecheckclean;src/renderer+src/sharedsuites pass (10,536 tests).Not checked: the editor Markdown preview and the kanban file preview by hand (same class as the output view, covered by the stylesheet pin), and the font list on Windows/Linux.
🤖 Generated with Claude Code