Skip to content

docs(ui): Enhance mdBook documentation aesthetics with custom CSS - #270

Open
pranitaurlam wants to merge 1 commit into
mohu-org:mainfrom
pranitaurlam:docs/custom-css-aesthetics
Open

docs(ui): Enhance mdBook documentation aesthetics with custom CSS#270
pranitaurlam wants to merge 1 commit into
mohu-org:mainfrom
pranitaurlam:docs/custom-css-aesthetics

Conversation

@pranitaurlam

@pranitaurlam pranitaurlam commented Jun 3, 2026

Copy link
Copy Markdown

Closes #267

Summary

  • Add docs/src/theme/custom.css with modern Inter font, JetBrains Mono for code, and glassmorphism sticky menu bar
  • Constrain prose reading width to 780px for comfortable line length
  • Round code block corners (border-radius: 10px) and improve padding
  • Sticky #menu-bar with backdrop-filter blur for glass effect on both light and dark themes
  • Mobile-responsive adjustments (@media max-width: 768px)
  • Wire the stylesheet in docs/book.toml via additional-css

Test plan

  • Run mdbook build docs/ locally and open docs/book/index.html in a browser
  • Verify Inter font loads and prose is constrained to readable width
  • Verify code blocks have rounded corners
  • Toggle dark/navy/coal/ayu themes — glassmorphism menu bar adapts
  • Resize to mobile width — menu bar stays sticky and readable

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Enhanced documentation site with refined typography and improved code block styling
    • Optimized responsive design for better mobile viewing experience

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Test User <test@example.com>
@pranitaurlam
pranitaurlam requested a review from Bbn08 as a code owner June 3, 2026 10:51
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f37a90ed-8c43-49af-aadc-b6c44f109b3b

📥 Commits

Reviewing files that changed from the base of the PR and between dcb4ca7 and 5c4a7bc.

📒 Files selected for processing (2)
  • docs/book.toml
  • docs/src/theme/custom.css

📝 Walkthrough

Walkthrough

This PR enhances the mdBook documentation site with a custom CSS stylesheet. It adds a configuration reference to enable the stylesheet, then implements comprehensive styling including modern typography, a sticky glassmorphism menu bar, readable prose layout, styled tables, and mobile responsiveness.

Changes

Documentation Custom Styling

Layer / File(s) Summary
Configuration and typography foundation
docs/book.toml, docs/src/theme/custom.css (lines 1–44)
The book build configuration references the custom CSS file. The CSS establishes typography with Inter and JetBrains Mono fonts, root font variables, body smoothing, constrained reading width, and baseline monospace styling for code elements.
Sticky menu bar with glassmorphism
docs/src/theme/custom.css (lines 46–71)
A sticky mobile menu bar uses glassmorphism effects with blur, translucency, border, and shadow; theme-specific overrides darken the menu for navy, coal, and ayu themes.
Sidebar, prose, tables, and mobile responsiveness
docs/src/theme/custom.css (lines 73–134)
Sidebar and chapter links receive font inheritance and rounded transitioning backgrounds. Prose readability is improved via line height and heading adjustments. Tables gain rounded corners, collapsed borders, and consistent padding. Mobile responsiveness adjusts menu stickiness, main content padding, and code block radius for screens up to 768px.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A stylesheet hops into the docs today,
With Inter fonts and glassmorphic display,
Sticky menus dance, tables align so neat,
Mobile screens dance—responsiveness complete! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding custom CSS to enhance mdBook documentation aesthetics.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #267: modern typography, constrained prose width, rounded code blocks, and glassmorphism menu bar with mobile responsiveness.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the custom CSS styling for documentation aesthetics as specified in issue #267; no unrelated modifications are present.
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

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.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

PR Check Summary

Item Value
Branch docs/custom-css-aesthetics
Changed crates none
Files changed 2

CI will run: build, test, clippy, fmt, cargo-deny, DCO, semver.
Reviewer assigned from CODEOWNERS.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mugiwaraluffy56 mugiwaraluffy56 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The CSS diff is scoped and CI is green, but the commit/PR metadata violates this repository’s contribution rules: the commit includes Co-Authored-By: Claude Sonnet 4.6, the PR body includes a generated-with-AI attribution, and the author/sign-off uses placeholder Test User <test@example.com>. AGENTS.md explicitly prohibits AI-tool mentions in commit messages, and DCO should identify the actual contributor. Please rewrite the commit with your real name/email and sign-off, remove AI attribution from the commit/PR text, then rerun the mdBook visual checks listed in the test plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(ui): Enhance mdBook documentation aesthetics with custom CSS

3 participants