-
Notifications
You must be signed in to change notification settings - Fork 25
Fix text clipping in gradient headings (Fixes #95) #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix text clipping in gradient headings (Fixes #95) #106
Conversation
- Add overflow-visible to parent containers - Set lineHeight 1.3 and paddingBottom 0.25rem to gradient headings - Fixes clipping of descenders (g, y) in: - My CATs heading - Loading Your CATs title - Token Management heading
WalkthroughThis PR fixes text clipping issues in gradient headings across three components by adding Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes This consists of simple, repetitive styling changes applied consistently across three files with no logic modifications. Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
web/src/app/[cat]/InteractionClient.tsx (1)
1032-1041: Prefer Tailwind utilities (or a shared “gradient-heading” class) over repeated inline styles.
Keeps styling consistent and avoids stringly-typedlineHeight.- <div className="text-center mb-8 overflow-visible"> + <div className="text-center mb-8 overflow-visible"> <motion.h1 className="text-4xl md:text-5xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-blue-600 to-blue-200 dark:from-[#FFD600] dark:to-white mb-4 md:mb-0 drop-shadow-lg" - style={{ lineHeight: '1.3', paddingBottom: '0.25rem' }} + // Tailwind: pb-1 = 0.25rem + // (If you want exact 1.3, keep leading-[1.3]; otherwise consider leading-snug) + // eslint-disable-next-line react/forbid-dom-props + className="text-4xl md:text-5xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-blue-600 to-blue-200 dark:from-[#FFD600] dark:to-white mb-4 md:mb-0 drop-shadow-lg leading-[1.3] pb-1"web/src/app/my-cats/page.tsx (1)
694-703: Fix is fine; same suggestion: replace inline style with Tailwind utilities/shared class.- <div className="flex flex-col md:flex-row justify-between items-center mb-12 overflow-visible"> + <div className="flex flex-col md:flex-row justify-between items-center mb-12 overflow-visible"> <motion.h1 - className="text-4xl md:text-5xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-blue-300 dark:from-[#FFD600] dark:to-yellow-100 mb-4 md:mb-0 drop-shadow-lg" - style={{ lineHeight: '1.3', paddingBottom: '0.25rem' }} + className="text-4xl md:text-5xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-blue-300 dark:from-[#FFD600] dark:to-yellow-100 mb-4 md:mb-0 drop-shadow-lg leading-[1.3] pb-1"web/src/components/ui/loading-state.tsx (1)
22-50: LGTM for clipping; consider Tailwind utilities to avoid inline style duplication.- <div className="text-center mb-12 overflow-visible"> + <div className="text-center mb-12 overflow-visible"> ... <motion.h1 className={`text-4xl md:text-5xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r ${ type === "loading" ? "from-blue-600 to-blue-200 dark:from-[#FFD600] dark:to-white" : "from-red-600 to-red-200 dark:from-red-400 dark:to-red-200" - } mb-4`} - style={{ lineHeight: '1.3', paddingBottom: '0.25rem' }} + } mb-4 leading-[1.3] pb-1`}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
PR_DESCRIPTION.md(1 hunks)web/src/app/[cat]/InteractionClient.tsx(1 hunks)web/src/app/my-cats/page.tsx(1 hunks)web/src/components/ui/loading-state.tsx(2 hunks)
🔇 Additional comments (1)
PR_DESCRIPTION.md (1)
1-20: Clear, scoped PR description (incl. issue reference + affected headings).
Fix text clipping in gradient headings
Issue
Fixed text clipping issue where descenders (letters like "g" and "y") were being cut off in gradient text headings using
bg-clip-text.Changes
overflow-visibleto parent containerslineHeight: '1.3'andpaddingBottom: '0.25rem'to headings with gradient textFiles Modified
web/src/app/my-cats/page.tsxweb/src/components/ui/loading-state.tsxweb/src/app/[cat]/InteractionClient.tsxFixes #95
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.