Skip to content

fix(style): broaden sidebar selector to match nav and div#638

Merged
NiamhRelevance merged 1 commit into
mainfrom
trying-to-fix-padding
May 22, 2026
Merged

fix(style): broaden sidebar selector to match nav and div#638
NiamhRelevance merged 1 commit into
mainfrom
trying-to-fix-padding

Conversation

@jordanc-relevanceai
Copy link
Copy Markdown
Collaborator

Summary

  • Mintlify's latest CLI renders the docs sidebar wrapper as <nav id="sidebar"> instead of <div id="sidebar">.
  • The existing div#sidebar rule in style.css silently no-ops against the new markup, leaving the sidebar drifting away from the viewport edge in mintlify dev.
  • Dropping the tag qualifier (#sidebar) keeps the rule working on both the current prod build (<div>) and the upcoming <nav> build — so this is also a proactive fix for the next prod deploy.

Test plan

  • mintlify dev — sidebar sits 2.5rem from the viewport edge (matches prod).
  • Confirm prod styling is unchanged after deploy (selector still matches <div>).

🤖 Generated with Claude Code

Mintlify's latest CLI emits the sidebar wrapper as <nav id="sidebar">
instead of <div id="sidebar">. The previous "div#sidebar" selector
silently no-ops on the new markup, letting the sidebar drift away
from the viewport edge. Dropping the tag qualifier keeps the rule
working on both the current prod build (<div>) and the upcoming
<nav> build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 22, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
relevanceai 🟢 Ready View Preview May 22, 2026, 4:40 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@github-actions
Copy link
Copy Markdown
Contributor

🎯 Vibe check

Reviewed: 1 file — style.css (CSS only, no MDX content)

This PR changes only style.css, a global stylesheet embedded in the Mintlify docs site. There is no documentation content to evaluate — no .mdx files were changed. Content quality dimensions (banned words, heading capitalization, product terminology, American English) do not apply.

What the CSS does:

  • Sets a wider prose max-width (90ch) and removes Tailwind's max-w-* constraints to use a 1400px-capped content area
  • Pins the right sidebar (#content-side-layout) as position: fixed and adds padding-right: 20rem to the content area on viewports ≥1280px to prevent content from flowing underneath it
  • Pulls the left sidebar (#sidebar) 2.5rem from the left edge
  • Preserves the search modal at 640px width via !important override
  • Hides background gradient decorations on mobile (≤640px)
  • Centers the .nav-tabs tab bar

Rendering concerns worth a manual check:

  • The [class*="max-w-"] wildcard selector sets max-width: 100% on every Tailwind max-w-* class. This is a broad override that catches utility classes on components (cards, callouts, images) — not just the content wrapper. Worth verifying that cards, <CardGroup> grids, and inline images don't look stretched on wide screens.
  • The right sidebar is pinned with top: 9.5rem. If the top nav bar height ever changes (e.g. a banner is added), this value will need a manual update.
  • No mobile/tablet breakpoint is defined for the fixed right sidebar, so on viewports between 640px and 1280px the sidebar's position: fixed and right: 2rem still apply, but the padding-right: 20rem content offset does not. Verify that mid-range viewports (e.g. 768px, 1024px) don't have the sidebar overlapping content.

No documentation content review is needed for this PR.

🔋 Credit usage
Item Count
Files reviewed 1
Context pages read 0
Total lines processed ~62

Files read: style.css (62 lines)

@NiamhRelevance NiamhRelevance merged commit 6fbc346 into main May 22, 2026
6 checks passed
@NiamhRelevance NiamhRelevance deleted the trying-to-fix-padding branch May 22, 2026 04:45
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