🐛 Fixed callout card accent links invisible in newsletter emails#27320
🐛 Fixed callout card accent links invisible in newsletter emails#27320andrewklingelhofer wants to merge 1 commit intoTryGhost:mainfrom
Conversation
fixes TryGhost#27317 The CSS refactor in e1fffbb moved shared card styles into a separate partial (card-styles.hbs) that gets included before newsletter-specific styles. This changed the source order so that `.post-content a` (from styles.hbs) now appears after `.kg-callout-card-accent a` (from card-styles.hbs). Since both selectors have the same specificity (0,1,0,1), the later rule wins and link text gets the linkColor instead of white, making it invisible on the accent background. Adding !important to the callout accent link rule ensures white text is preserved regardless of source order, consistent with how CTA card link colors already use !important in the same file.
|
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)
WalkthroughA CSS declaration in the email rendering partial for card styles has been modified to increase specificity. The color property for links within the callout card accent element now includes the 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|



fixes #27317
Summary
card-styles.hbs) that gets included before newsletter-specific styles instyles.hbs. This changed the source order so that.post-content a { color: {{linkColor}} }(line ~555) now appears after.kg-callout-card-accent a { color: #fff }(fromcard-styles.hbsincluded at line 26). Since both selectors have the same specificity(0,1,0,1), the later rule wins and overrides the white link color with{{linkColor}}, making links invisible on accent-colored callout backgrounds.!importantto.kg-callout-card-accent a { color: #fff; }to preserve white link text regardless of source order, consistent with CTA card link styles in the same file.Test plan
Note
Low Risk
Low risk CSS-only change limited to email rendering; primary risk is unintended link color overrides in accent callout cards across email clients due to
!important.Overview
Fixes newsletter email rendering where links inside accent-colored callout cards could inherit the global link color and become unreadable.
Updates
.kg-callout-card-accent aincard-styles.hbsto setcolor: #fff !important, ensuring white link text wins regardless of stylesheet source order.Reviewed by Cursor Bugbot for commit 414e1a5. Bugbot is set up for automated code reviews on this repo. Configure here.