Skip to content

fix(docs): scope tiny-robot style overrides for vp-doc collisions#106

Open
SonyLeo wants to merge 4 commits into
devfrom
sonyleo/fix/docs-scoped-style-overrides
Open

fix(docs): scope tiny-robot style overrides for vp-doc collisions#106
SonyLeo wants to merge 4 commits into
devfrom
sonyleo/fix/docs-scoped-style-overrides

Conversation

@SonyLeo
Copy link
Copy Markdown
Collaborator

@SonyLeo SonyLeo commented May 13, 2026

修复 tiny-robot 文档 Tip 信息及示例显示异常的问题

1、Tip 的显示

修复前

image image image image

修复后

image image image image image

2、文档案例的显示

  • Feedback 组件
  • McpSeverPicker 组件
  • Attachments 组件
  • History 组件

修复前

image image image image

修复后

image image image image

Summary by CodeRabbit

  • Style
    • Enhanced visual styling for documentation pages with improved layout and spacing for embedded UI components including feedback, attachments, history, and form upload features.
    • Refined link and button presentation for better visual hierarchy.
    • Optimized custom block element layouts and icon alignment.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Walkthrough

Adds targeted CSS rules to the VitePress theme: feedback source “pill” link and dropdown padding tweaks, attachment download link styling, preview image and list normalization under _tiny-robot_, and a _tiny-robot_-scoped two-column grid layout for .custom-block.

Changes

Documentation Theme Styling

Layer / File(s) Summary
Feedback pill, dropdown, and attachment link styling
.vitepress/theme/style.css
Styles feedback “source pill” links (color/font-weight/hover underline), adjusts feedback action-group dropdown padding, and sets attachment download action links to use brand link color with consistent underline suppression.
tiny-robot preview image and list normalization
.vitepress/theme/style.css
For _tiny-robot_ previews, forces images to display: block with zero margin; removes default ul/ol list styling and normalizes li line-height and spacing.
tiny-robot .custom-block two-column grid layout
.vitepress/theme/style.css
Implements a 2-column CSS grid for .custom-block under _tiny-robot_, moves child content into column 2, resets list margins/padding inside the block, and places the .custom-block::before icon in column 1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit hops through style and rule,
Pill links gleam and previews cool,
Downloads dressed in brand-new hue,
Tiny robot grids line two-by-two,
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: scoping tiny-robot style overrides to prevent collisions with vitepress documentation (vp-doc) styles. This is directly aligned with the changeset's primary purpose of adding targeted CSS rules.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sonyleo/fix/docs-scoped-style-overrides

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.vitepress/theme/style.css (1)

860-863: 💤 Low value

Redundant hover state properties.

The hover state re-declares text-decoration: none and border-bottom: none, but both properties are already set to none in the base state (lines 856-857). These declarations have no effect and can be removed.

♻️ Simplify hover state
 .vp-doc[class*="_components_attachments"] .tr-file-card a.tr-file-card__action-btn--download:hover {
-    text-decoration: none;
-    border-bottom: none;
 }

If no hover-specific styling is needed, the entire hover rule can be removed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.vitepress/theme/style.css around lines 860 - 863, The hover rule for
.vp-doc[class*="_components_attachments"] .tr-file-card
a.tr-file-card__action-btn--download:hover is redundant because text-decoration
and border-bottom are already set to none in the base selector (.tr-file-card
a.tr-file-card__action-btn--download); remove those duplicated declarations or
delete the entire :hover rule if no hover-specific styles are required to
simplify the CSS.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.vitepress/theme/style.css:
- Around line 860-863: The hover rule for
.vp-doc[class*="_components_attachments"] .tr-file-card
a.tr-file-card__action-btn--download:hover is redundant because text-decoration
and border-bottom are already set to none in the base selector (.tr-file-card
a.tr-file-card__action-btn--download); remove those duplicated declarations or
delete the entire :hover rule if no hover-specific styles are required to
simplify the CSS.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6c8fd992-31a0-47f6-9605-928a1b73e65b

📥 Commits

Reviewing files that changed from the base of the PR and between c0c264a and 6a7136f.

📒 Files selected for processing (1)
  • .vitepress/theme/style.css

Comment thread .vitepress/theme/style.css
Comment thread .vitepress/theme/style.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants