Skip to content

Conversation

@wuyiping0628
Copy link
Contributor

@wuyiping0628 wuyiping0628 commented Jan 22, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Fixed logo being visually squeezed on desktop screens, restoring correct proportions and clarity.
    • Improved mobile logo sizing to prevent overflow and ensure consistent layout across narrow screens, maintaining readability and alignment.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Walkthrough

Updated a single Vue component to override global img sizing rules and add responsive CSS so the header logo retains intended dimensions on desktop and narrow/mobile viewports.

Changes

Cohort / File(s) Change Summary
Logo Styling Constraints
./vitepress/theme/components/CustomHeader.vue
Added max-width: none; and min-width: 0; to prevent global img max-width from squeezing the logo; added mobile-specific rule (.mb-logo .logo-icon) with responsive dimensions (width: 160px; height: 26px) and disabled max-width to avoid overflow.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 I nibbled a rule and loosened the thread,
The logo can breathe — no more squeeze in my head.
On phones it stands tidy, on desktop it's free,
A hop, a small tweak — now the header's happy with me.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: edit logo style' directly describes the main change in the pull request, which modifies logo styling constraints in the CustomHeader.vue component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.vitepress/theme/components/CustomHeader.vue:
- Around line 756-761: The CSS rule .mb-logo .logo-icon forces a 120×28 size
that distorts the SVG (intrinsic aspect ratio ~6.23:1); change the rule to rely
on height and let the width auto-scale (e.g., remove the explicit width:120px
and use height:28px; width:auto) so the SVG keeps its aspect ratio (also ensure
SVG has preserveAspectRatio set if needed and keep max-width:none as required).

@kagol kagol merged commit 6855507 into opentiny:dev Jan 29, 2026
0 of 2 checks passed
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