Converted em line-height values to unitless in email templates#26825
Converted em line-height values to unitless in email templates#26825minimaluminium wants to merge 3 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe patch modifies email template CSS to standardize line-height declarations. Line-height values with unit suffixes (em, px) are converted to unitless numbers. Most em-based values like 1.6em and 1.2em are replaced with their numeric equivalents (1.6, 1.2). Pixel-based values are converted to precise unitless ratios (e.g., 18px becomes 1.125). These changes apply across multiple CSS selectors including headings, paragraphs, blockquotes, and component-specific styles. The modification affects 47 lines in the styles.hbs file. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Velo CI Failure AnalysisClassification: 🟠 SOFT FAIL
|
Prevents compounding line-height scaling when iOS Dynamic Type increases font sizes, which caused excessive line spacing in newsletter emails.
28e9852 to
a4e4598
Compare
|



ref https://linear.app/ghost/issue/DES-1306/text-size-issues-when-using-accessibility-features-on-iphones
When iPhone users increase text size via iOS Dynamic Type, Ghost newsletter emails have excessively large line spacing, making them nearly unreadable. The root cause is em-based line-height values in the email template — when Dynamic Type scales font sizes, em line-heights compound the scaling.
This converts all line-height: Xem values to unitless line-height: X in the email stylesheet. Unitless values are the recommended best practice for email accessibility, as they scale proportionally without compounding.