zed/assets
David Alecrim 46ff888db8
markdown_preview: Add font size settings and actions (#55489)
Add support for scaling the Markdown preview's body text and headings
with `cmd-=` / `cmd--` / `cmd-0`. Previously these shortcuts only
resized code blocks because the preview's body used `ui_font_size` and
headings used a rem-based scale anchored to it, while the keybindings
only mutated `BufferFontSize`.

The preview's scroll subtree is now wrapped in
`WithRemSize(buffer_font_size)`, so `1rem` resolves to the buffer font
size inside the preview. Body text, headings
(`text_3xl`/`text_2xl`/...), and rem-based spacing all scale together.
The outer focus root and scrollbar remain at the UI font size.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #55374

Release Notes:

- Added `markdown_preview_font_size` setting and actions to scale
Markdown preview font size separately from the editor.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-06-26 05:12:59 +00:00
..
badge Adjust Zed badge (#35294) 2025-07-29 15:09:31 -04:00
fonts Use semibold (#47725) 2026-01-27 08:50:52 -07:00
icons sandbox: Linux domain filtering and some more cleanup (#59790) 2026-06-24 01:42:52 +00:00
images cloud_api_types: Add ZedVip variant to Plan (#59443) 2026-06-18 20:51:36 +00:00
keymaps agent_ui: Fix opening the profile configuration modal from picker (#59768) 2026-06-23 15:18:56 +00:00
prompts A couple new inline assistant tests (#45049) 2025-12-17 13:02:03 -08:00
settings markdown_preview: Add font size settings and actions (#55489) 2026-06-26 05:12:59 +00:00
sounds call: Play a different sound when a guest joins (#38987) 2025-09-27 09:20:55 -04:00
themes Revert vim mode colors in One theme (#56772) 2026-05-14 17:33:59 +00:00