fix(code): stop scaling markdown italics 1.18×#1887
Draft
posthog[bot] wants to merge 1 commit intomainfrom
Draft
fix(code): stop scaling markdown italics 1.18×#1887posthog[bot] wants to merge 1 commit intomainfrom
posthog[bot] wants to merge 1 commit intomainfrom
Conversation
Radix Themes ships --em-font-size-adjust: 1.18 (and the same for Quote) to make Times New Roman italic visually match the surrounding sans body. Since we override --em-font-family / --quote-font-family to Open Runde, the compensation no longer applies and just makes italics render ~18% larger than neighbouring text — the "hilariously large" italics seen in agent chat. Set both adjustments to 1. Generated-By: PostHog Code Task-Id: ad6f03b1-a226-42a3-99df-47cb2ed0a51f
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.
Summary
Italics in agent chat (and any other
MarkdownRenderersurface) were rendering noticeably larger than the surrounding text. Root cause: Radix Themes ships these defaults…and the
Em/Quotecomponents apply them viafont-size: calc(var(--em-font-size-adjust) * 1em). The 1.18 multiplier exists to make Times New Roman italic (smaller x-height) visually match a neighbouring sans-serif. Sinceglobals.cssalready overrides--em-font-familyand--quote-font-familytovar(--font-sans)(Open Runde), the compensation no longer applies — it just inflates italics by ~18%.Setting both adjustments to
1brings italics back in line with body text.Test plan
*italic text*and_more italic_; verify italics now match the body text size.> quoted line) render at body size.**strong**), inline code, or code blocks.Created with PostHog Code