Repository navigation
Fix Gemini, Claude and ChatGPT Canvas typography, RTL lists, and English font fallbacks - #185
Open
akammohammadpouri wants to merge 4 commits into
Open
akammohammadpouri wants to merge 4 commits into
akammohammadpouri wants to merge 4 commits into
Conversation
This branch has not been deployed
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
This PR resolves typography regressions introduced in #172 across Gemini and Claude, restores proper RTL list marker positioning inside ChatGPT Canvas (ProseMirror), preserves Gemini's native list markers/counters, and aligns Claude English text with its authentic native typography:
1. Gemini Conversation Sidebar, Tooltips & Native List Markers:
[class*="icon" i] *excluded all children of elements whose class containedicon. Because Angular Material MDC wraps conversation list items in<a class="... mdc-list-item--with-leading-icon ...">, all conversation titles (.title-text,.gds-emphasized-body-s) and their hover tooltips were stripped of FontARA font.:not([class*="-with-"])) so MDC containers are no longer misidentified as icons.[style*="font-"] *with:is([style*="font-family" i], [style*="font:" i]) *so inline font metrics (font-size,--font-scale, etc.) no longer strip readable text.:not(.md-content *). Gemini modern UI (.md-content) renders custom hollow SVG circle bullets (○) onul > li::beforeand numbered counters (1.,2.) onol > li::before. Scoping ensures these native markers and compact padding remain intact while applyingdirection: rtlandtext-align: rightto Persian list items.2. Claude Messages, Markdown Previews & English Font Fallbacks:
[style*="font-"] *matching with:is([style*="font-family" i], [style*="font:" i])so Claude's--_prose-font-bodycustom property is preserved.[data-row-main-button],[data-roving-item],.dframe-fade-label) to ensure sidebar conversation titles receive the UI font fallback.--fontara-claude-message-fallbackdirectly to Claude's dynamic body font variables (var(--_prose-font-body, var(--font-claude-response, var(--cds-font-voice)))) and fixed font names to match Claude's kebab-case@font-facedefinitions ("anthropic-serif","anthropic-sans"). English text now seamlessly renders using Claude's authentic native typography (identical to extension-off state), while Persian text uses FontARA.3. ChatGPT Canvas RTL List Markers:
<p dir="rtl">or<p dir="auto">. Updated writing block list styles to applydirection: rtl !important; padding-inline: 1.5rem 0 !important;toul/ol:is([dir="rtl"], :has([dir="rtl"]), :has(p[dir="auto"])).site-adapters.ts, ensured that when a child paragraph inside a list item becomes RTL, both the parent<li>and<ul>/<ol>roots receive and trackdir="rtl".Verification
--_prose-font-body, Markdown text, and sidebar roving buttons.direction: rtl,padding-right: 24px,padding-left: 0px).pnpm typecheckpassed (0 errors, no deprecated APIs).node --import tsx --test tests/unit/site-css.test.ts tests/unit/rtl-support.test.tspassed (19/19 tests).pnpm build:allpassed withinject/index.jscomfortably within budget (167,736 / 167,936 bytes — 200 bytes under budget).