Skip to content

Optimizing Vitepress Layout and Typography Improvements#18

Merged
nschimme merged 8 commits intoMUME:mainfrom
nschimme:improve-readability-styles-10319911274393356616
May 7, 2026
Merged

Optimizing Vitepress Layout and Typography Improvements#18
nschimme merged 8 commits intoMUME:mainfrom
nschimme:improve-readability-styles-10319911274393356616

Conversation

@nschimme
Copy link
Copy Markdown
Contributor

@nschimme nschimme commented May 7, 2026

Description

Optimizing Vitepress Layout and Typography Improvements

Related Issue

Checklist

  • Wiki Rules: I have followed the Content Rules (mortal knowledge only) and Spoiler Rules (using ::: details Spoiler) as defined in the Contributing Guide.
  • Content Accuracy: I have verified the information added/changed is accurate to the game.
  • Visual Check: I have verified that the page renders correctly (no broken tables, lists, or styling).
  • Local Build: (For coders) Ran docker compose up --build wiki (or npm run docs:build) and verified changes locally.
  • Index Pages: Updated top-level index pages (e.g., docs/guides.md, docs/classes.md) if a major new page was added.

Summary by Sourcery

Optimize VitePress documentation layout and typography for improved readability and skimmability across screen sizes.

Enhancements:

  • Adjust documentation font size and heading hierarchy for better readability and visual hierarchy within .vp-doc pages.
  • Refine spacing and flow between paragraphs, lists, code blocks, and custom blocks to reduce visual clutter and cumulative gaps.
  • Increase documentation content width and container sizing while keeping homepage and ultra-wide layouts distinct and readable.
  • Style the sidebar outline ('On this page') section with adjusted typography and hover/active states for clearer navigation.
  • Align hero and feature titles with the updated gold color and typographic tuning on the homepage.
  • Constrain documentation layout width on very large screens while preserving a wider layout for non-doc pages.

nschimme added 8 commits May 6, 2026 19:16
- Increase content max-width to 850px for better line lengths
- Reduce base font size to 15px to improve scannability
- Refine heading weights (500) and sizes (h1: 2.2em, h2: 1.75em, h3: 1.4em)
- Reduce heading margins to improve content flow

These changes address feedback regarding narrow page width, large font size, and disruptive headings using standard VitePress theme variables.
- Increase content max-width to 900px for a wider feel
- Reduce base font size to 15px to improve information density
- Expand total container to 1200px to better fit content and sidebar
- Optimize heading sizes and margins for better reading flow
- Adjust line-height to 1.6 for improved skimming speed
…port

- Increased content width to 900px (standard) and 1100px (2K+).
- Reduced base font size to 15px for improved skimming.
- Optimized heading sizes and margins to enhance reading flow.
- Implemented a 3-column CSS grid layout to center main content on large screens while keeping the aside menu on the right.
- Set base font size to 15px for improved skimming.
- Increased content max-width to 1000px (1064px including padding) for better wide-screen utilization.
- Adjusted heading margins and removed h2 border-bottom to enhance reading flow.
- Optimized selectors in style.css to override hardcoded VitePress defaults maintainably.
- Increase content max-width to 1064px (1000px text area) for better screen utilization.
- Reduce base font-size to 15px (scoped to .vp-doc) to improve skimmability while preserving homepage hero styling.
- Refine heading flow by removing h2 bottom borders and optimizing vertical margins.
- Maintain site-wide max-width at 1440px to ensure navigation grouping on wide screens.
- Implement overrides using high-specificity selectors to avoid !important flags.
- Increase content max-width to 1064px (1000px text area) using robust selectors.
- Reduce doc font-size to 0.9375rem (scoped to .vp-doc) for accessibility and skimming.
- Optimize vertical flow with sibling margins and association-based heading spacing.
- Remove h2 borders and excessive nested list gaps to improve reading flow.
- Group custom theme variables in :root for better maintainability.
…mentation

- Increase content max-width to 1064px (1000px text area) using robust selectors scoped to #VPContent.
- Reduce doc font-size to 0.9375rem (scoped to .vp-doc) for improved skimming and accessibility.
- Scope heading typography (h1-h6) to .vp-doc and homepage containers to avoid site-wide side effects.
- Namespace .VPDocAside styles under #VPContent to ensure they only affect documentation pages.
- Refine vertical flow with sibling margins and association-based heading spacing.
- Group custom theme variables in :root for better maintainability.
- Increase content max-width to 1064px (1000px text area) scoped to #VPContent.
- Reduce documentation font-size to 0.9375rem for improved skimming and accessibility.
- Update Aside outline font sizes to rem units (0.6875rem and 0.8125rem) for better scaling.
- Scope layout width constraints: 1440px for docs, 2400px for home on ultra-wide screens.
- Scope heading typography (h1-h6) to .vp-doc and homepage containers.
- Refine vertical flow with association-based heading margins and sibling spacing.
- Group all custom theme variables in :root for maintainability.
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 7, 2026

Reviewer's Guide

Refines VitePress documentation layout and typography by narrowing doc font size, restructuring heading and body spacing, widening the doc content width while constraining it on ultra-wide screens, and restyling the "On this page" aside and hero/feature headings for better readability and visual hierarchy.

State diagram for responsive documentation layout breakpoints

stateDiagram-v2
  direction LR

  [*] --> viewport_lt_960

  state viewport_lt_960 {
    [*] --> mobile_layout
    mobile_layout: VPDoc_content_width_default
    mobile_layout: VPDoc_container_width_default
  }

  viewport_lt_960 --> viewport_960_to_1439: viewport_width_ge_960
  viewport_960_to_1439 --> viewport_ge_1440: viewport_width_ge_1440

  state viewport_960_to_1439 {
    [*] --> doc_with_sidebar
    doc_with_sidebar: VPDoc_has_sidebar_true
    doc_with_sidebar: content_max_width_mume_doc_max_width
    doc_with_sidebar: container_max_width_mume_doc_container_max_width

    doc_with_sidebar --> doc_without_sidebar: toggle_sidebar_off

    state doc_without_sidebar {
      [*] --> doc_without_sidebar_inner
      doc_without_sidebar_inner: VPDoc_has_sidebar_false
      doc_without_sidebar_inner: content_max_width_mume_doc_max_width
      doc_without_sidebar_inner: container_max_width_mume_doc_container_max_width
    }

    doc_without_sidebar --> doc_with_sidebar: toggle_sidebar_on
  }

  state viewport_ge_1440 {
    [*] --> ultra_wide_home_or_other
    ultra_wide_home_or_other: root_vp_layout_max_width_2400

    ultra_wide_home_or_other --> ultra_wide_doc

    state ultra_wide_doc {
      [*] --> doc_layout_constrained
      doc_layout_constrained: VPDoc_vp_layout_max_width_1440
      doc_layout_constrained: content_max_width_mume_doc_max_width
      doc_layout_constrained: container_max_width_mume_doc_container_max_width
    }
  }
Loading

File-Level Changes

Change Details Files
Adjust documentation typography (font sizing, headings, and text flow) for improved readability and skimming.
  • Introduce documentation-specific CSS custom properties for max widths and base font size, including --mume-doc-max-width, --mume-doc-container-max-width, and --mume-font-size-doc.
  • Scope a reduced base font size to .vp-doc and adjust heading styles (weights, letter-spacing, margins, font-sizes, and line-heights) for h1–h3 within .vp-doc.
  • Standardize vertical rhythm in .vp-doc by using top margins on paragraphs, summaries, blockquotes, tables, code blocks, and custom blocks, and tweak list spacing to avoid cumulative gaps while preserving multi-paragraph list items.
docs/.vitepress/theme/style.css
Reconfigure documentation layout widths and ultra-wide behavior for better line length and separation between docs and other pages.
  • Remove the previous global wide-screen layout overrides and instead add media-query-based max-width adjustments for #VPContent .VPDoc .content, .container, and .content-container to achieve ~1000px text width at appropriate breakpoints.
  • Add ultra-wide (min-width: 1920px) behavior that maintains a 2400px layout max width globally while constraining .VPDoc pages to a 1440px layout max width for improved readability.
docs/.vitepress/theme/style.css
Restyle the documentation aside outline and hero/feature titles to align with the new typography system.
  • Add styles for #VPContent .VPDocAside, including a left border, smaller uppercase outline title with muted color, and refined outline link colors, sizes, and hover/active behaviors.
  • Ensure the home hero name and feature titles use the gold color, Georgia-based typography, and consistent weight/letter-spacing to match the rest of the site’s visual hierarchy.
docs/.vitepress/theme/style.css

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@nschimme nschimme merged commit 3e9b961 into MUME:main May 7, 2026
3 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.

1 participant