-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix(client): improve markdown content spacing #6197
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
Conversation
…ntent - Add comprehensive heading styles (h1-h6) with proper spacing hierarchy - Add horizontal rule/separator styling with 20px vertical margin - Add blockquote styling with left border and italic text - Add code block styling with background and proper padding - Add inline code highlighting - Ensure first heading has no top margin for clean layout - Maintains compact spacing while providing clear visual hierarchy
- Reduce blockquote vertical margin from 12px to 8px - Reduce vertical padding from 8px to 4px - Add compact paragraph spacing inside blockquotes - Maintains readability while reducing overall height
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ 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 |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
|
Claude finished @wtfsayo's task —— View job PR Review: Markdown Content Spacing FixesTodo List:
Review SummaryThis PR adds comprehensive CSS styling for markdown content rendering in the ElizaOS client. The changes look well-structured and improve the visual consistency of markdown elements. Analysis✅ APPROVED - No critical issues found Review Notes: 💡 SUGGESTION: Line 188 - Hard-coded color value → Consider: Use CSS custom property instead of /* Instead of: */
color: #f5f5f5;
/* Consider: */
color: hsl(var(--foreground));💡 SUGGESTION: Lines 276, 288, 299, 310, 321, 333 - Hard-coded white colors → Consider: Use CSS custom properties for better theme integration /* Instead of: */
color: #ffffff;
/* Consider: */
color: hsl(var(--foreground));💡 SUGGESTION: Lines 350, 357 - Hard-coded RGBA values → Consider: Use CSS custom properties with opacity for better maintainability /* Instead of: */
border-top: 1px solid rgba(255, 255, 255, 0.15);
/* Consider: */
border-top: 1px solid hsl(var(--border));Positive Aspects:
Code Quality:
The changes effectively address the stated goals of improving markdown content spacing and readability without introducing any security concerns or breaking changes. |
| .markdown-content h5:first-child, | ||
| .markdown-content h6:first-child { | ||
| margin-top: 0 !important; | ||
| } |
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.
Bug: First-child selector matches all headings due to wrapper divs
The :first-child selectors for headings (.markdown-content h1:first-child, etc.) likely won't work as intended. The existing CSS on lines 192-195 reveals that Streamdown wraps elements in divs, using display: contents to collapse them visually. However, :first-child evaluates DOM structure, not visual layout. If each block element is wrapped in its own div, every heading becomes a "first-child" of its wrapper, causing all headings (not just the first in the content) to have margin-top: 0 applied.
This PR includes two fixes for markdown content spacing in the client:
These changes improve the visual consistency and readability of markdown content rendered in the client.
Note
Adds consistent styles and spacing for markdown headings, separators, blockquotes, and code (blocks/inline) in
packages/client/src/index.css.packages/client/src/index.css):h1–h6): add consistent sizes, weights, line-heights, margins, and first-child top-margin removal.hrwith uniform spacing and subtle border.pre: add margins, padding, rounded corners, overflow handling, and background.code: set monospace font and size; add inline code background, padding, and radius.Written by Cursor Bugbot for commit a70e5b8. This will update automatically on new commits. Configure here.