Skip to content

fix: apply --font-mono to code elements - #3299

Merged
colepeters merged 1 commit into
v5-alphafrom
sdk-3002/code-font
Nov 5, 2026
Merged

colepeters merged 1 commit into
v5-alphafrom
sdk-3002/code-font

Conversation

@colepeters

@colepeters colepeters commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Description

Applies the --font-mono font family stack to code elements. Fixes https://linear.app/sanity/issue/SDK-3002/inline-code-in-text-renders-in-the-browsers-monospace-font

What to review

Is the font set correctly?

Testing

Added a new Text story with nested semantic elements.


Note

Low Risk
Small global CSS reset tweak with no auth, data, or logic changes; low blast radius aside from all code elements inheriting --mono.

Overview
Inline <code> inside typography (e.g. Text) now uses the design system monospace stack instead of the browser default.

The global reset adds :where(code) { font-family: var(--mono); }, matching how .sui-font-mono is wired elsewhere. A NestedElements Storybook story covers <strong>, <em>, and <code> inside Text for manual/visual checks. The changeset records a @sanity/ui patch.

Reviewed by Cursor Bugbot for commit df33924. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: df33924

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

This PR includes changesets to release 1 package
Name Type
@sanity/ui 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

@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Actions Updated
sanity-ui-storybook Ignored Ignored Nov 4, 2026 9:34pm UTC
sanity-ui-workshop Ignored Ignored Nov 4, 2026 9:34pm UTC
ui-docs Ignored Ignored Nov 4, 2026 9:34pm UTC
ui-studio Ignored Ignored Nov 4, 2026 9:34pm UTC

Request Review

@laurenashpole laurenashpole left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@colepeters
colepeters merged commit 3d32506 into v5-alpha Nov 5, 2026
15 of 16 checks passed
@colepeters
colepeters deleted the sdk-3002/code-font branch November 5, 2026 15:08
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.

2 participants