Skip to content

docs(ui): enhance mdbook docs aesthetics with custom css - #268

Open
Xploit-Ghost wants to merge 3 commits into
mohu-org:mainfrom
Xploit-Ghost:issue-267
Open

docs(ui): enhance mdbook docs aesthetics with custom css#268
Xploit-Ghost wants to merge 3 commits into
mohu-org:mainfrom
Xploit-Ghost:issue-267

Conversation

@Xploit-Ghost

@Xploit-Ghost Xploit-Ghost commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

This PR introduces a custom UI enhancement for the project's user-facing mdBook documentation.

Changes made:

  • Added docs/theme/custom.css containing rules for modern typography (Inter fallback stack), tighter letter spacing, readability width limits, and a frosted-glass sticky menu for mobile views.
  • Updated docs/book.toml to correctly load additional-css = ["theme/custom.css"].

These changes significantly improve the aesthetic quality and reading experience of the mohu docs while maintaining full compatibility with the existing build pipeline.

Resolves #267
Thank you for your time!
Please add the appropriate gssoc:approved , difficulty, type and quality labels.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Added examples to library documentation for improved clarity.
    • Enhanced documentation site styling with improved typography, spacing, and responsive design for better readability.

Signed-off-by: Anvesh <127006149+Xploit-Ghost@users.noreply.github.com>
Signed-off-by: Anvesh <127006149+Xploit-Ghost@users.noreply.github.com>
@Xploit-Ghost
Xploit-Ghost requested a review from Bbn08 as a code owner June 1, 2026 11:03
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

PR Check Summary

Item Value
Branch issue-267
Changed crates crates/mohu-buffer
Files changed 3

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

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Xploit-Ghost, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 51 minutes and 25 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e2900f06-54db-40e3-a673-e592a02b50e9

📥 Commits

Reviewing files that changed from the base of the PR and between ab7c667 and 91b16f2.

📒 Files selected for processing (1)
  • docs/theme/custom.css
📝 Walkthrough

Walkthrough

This PR enhances project documentation through two complementary improvements: Rustdoc examples in the Layout API that demonstrate shape and stride behavior, and a custom CSS stylesheet for the mdBook site that introduces modern typography, readability constraints, styled code blocks, and a sticky navigation bar with glassmorphism for mobile screens.

Changes

Documentation Improvements

Layer / File(s) Summary
Layout API documentation examples
crates/mohu-buffer/src/layout.rs
Expands Rustdoc for Layout struct and new_c / new_f constructors with runnable examples that construct C and F-contiguous layouts and assert expected shape and stride values.
mdBook custom CSS stylesheet
docs/book.toml, docs/theme/custom.css
Configures mdBook to load custom styling, then defines global typography via CSS variables, constrains content width and line height, updates heading weight and letter-spacing, rounds code block corners, and adds a sticky, blurred navigation bar with a bottom border for mobile viewports.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

🐰 A rabbit's verse on docs so fine:
Stride examples dance in line,
Typography takes center stage,
Rounded code blocks grace each page,
Mobile menus float with glow—
All the docs now brightly show!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes changes to crates/mohu-buffer/src/layout.rs (adding Rustdoc examples) which appears to be an unrelated change not mentioned in the linked issue #267. The Layout API documentation changes should be separated into a different PR or the linked issues should be updated to include this documentation task.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding custom CSS to enhance mdBook documentation aesthetics.
Linked Issues check ✅ Passed The PR implements all core objectives from issue #267: custom CSS with modern typography, reading width constraints, rounded code blocks, and sticky glassmorphism menu for mobile.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

@Xploit-Ghost

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@docs/theme/custom.css`:
- Around line 2-4: The CSS root variable --fonts references 'Inter' but the font
is never loaded; update the stylesheet to load Inter by adding a font import or
`@font-face` before the :root declaration (e.g., import Inter from Google Fonts or
your CDN/self-hosted URL) so the font-family declared in :root (--fonts)
actually uses Inter at runtime; ensure the import URL matches the desired
weights/display settings and that the `@import/`@font-face appears above the :root
selector so browsers apply it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7bce6011-7583-438e-ad2c-56b4d5bb42b4

📥 Commits

Reviewing files that changed from the base of the PR and between 0afc975 and ab7c667.

📒 Files selected for processing (3)
  • crates/mohu-buffer/src/layout.rs
  • docs/book.toml
  • docs/theme/custom.css

Comment thread docs/theme/custom.css
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@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!

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

2 participants