Skip to content

Fix navbar overflow and tame light-mode card hover#669

Open
LindsayAuch wants to merge 7 commits into
mainfrom
LindsayAuch/post-merge-followups
Open

Fix navbar overflow and tame light-mode card hover#669
LindsayAuch wants to merge 7 commits into
mainfrom
LindsayAuch/post-merge-followups

Conversation

@LindsayAuch
Copy link
Copy Markdown
Contributor

@LindsayAuch LindsayAuch commented May 8, 2026

Summary

  1. Logo size: `41x297 / 46x334` was overflowing the 37px navbar height, pushing the page heading into the secondary nav row. Reduced to 32x232 so the wordmark fits comfortably with breathing room. Native 7.25:1 ratio is preserved so the SVG stays crisp.
  2. DocCard hover (light mode only): drop the border so only the white fill + shadow remain on hover. Dark mode keeps the `--brand-digital-blue` outline since the dark background needs more contrast for the affordance to read.

Test plan

  • Run `yarn start`, check any docs page on desktop — page heading sits below the secondary nav with a clear gap, no overlap.
  • Visit a category index page and hover any card in light mode — fills white, picks up shadow, no border tint.
  • Same in dark mode — fills grey-800, gets blue outline.

🤖 Generated with Claude Code

* Logo: 41x297 / 46x334 was overflowing the 37px navbar height,
  pushing the page heading into the secondary nav row. Reduced to
  32x232 so the wordmark fits comfortably with breathing room.
  Native 7.25:1 ratio preserved for crisp rendering.
* DocCard hover (light mode only): drop the border so only the
  white fill + shadow remain. Dark mode keeps the brand blue
  outline since the dark background needs more contrast to read
  the affordance.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@mike-solomon mike-solomon left a comment

Choose a reason for hiding this comment

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

UI changes look good to me - but I think an AI file accidentally snuck in to this PR.

Comment thread AGENTS.md
@@ -0,0 +1,176 @@
# Moderne Documentation Project Instructions
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.

Why was this file added? This looks like a duplicate of the claude.md file. If we want to add a file like this, I believe we should do it in a separate PR.

* Removed the desktop --ifm-navbar-height redefinition that was
  double-counting the secondary nav (=85px) and then formulas added
  another 48px on top, pushing content too far down on category
  pages and creating sidebar/header overlap.
* At <=996px: zero out --ifm-secondary-nav-height (no secondary
  nav rendered on narrow), and pin --ifm-navbar-padding-horizontal
  and --ifm-spacing-horizontal both to 20px so the hamburger menu,
  breadcrumbs, and article column share a single 20px left edge.
* Footer no longer sticky to viewport bottom on top-level category
  pages — flows as the last block element so it never sits on top
  of article content.
* Footer at <=1060px: stacks left-aligned in this order — links
  (copyright + Terms/Privacy/Contact us/Licensing) → Give feedback
  button → social icons. Container is full width with a 20px left
  padding to match the article column above.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@LindsayAuch LindsayAuch force-pushed the LindsayAuch/post-merge-followups branch from e5b519d to ec3d243 Compare May 8, 2026 18:54
@LindsayAuch
Copy link
Copy Markdown
Contributor Author

Good catch — split into its own PR: #671. Force-pushed this branch to drop commit 88d2d69 so #669 only contains the design-polish work now.

* Footer: removed docs-page-only scoping (margin-left: 307px under
  html.docs-wrapper) so the home and docs footer share one ruleset.
  Container is full-width, stacks vertically below 1060px
  (links → Give feedback → social icons, left-aligned with 20px
  viewport padding).
* Navbar: search and color-mode toggle were touching at narrow
  widths because NavbarSearch renders a div with the CSS-module
  class .navbarSearchContainer (not .navbar__search). Added
  .navbarCenter gap: 20px and an explicit margin-right: 24px on
  [class*='navbarSearchContainer'] inside .mobileControls so
  spacing applies in both layouts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@LindsayAuch
Copy link
Copy Markdown
Contributor Author

@mike-solomon ready for another look — two follow-up commits since your review:

  • `ec3d243c5` — Responsive footer + narrow-width spacing fixes: dropped the desktop `--ifm-navbar-height` redefinition that was double-counting the secondary nav; zeroed `--ifm-secondary-nav-height` under 997px; aligned hamburger / breadcrumbs / footer to a shared 20px left edge; removed the sticky-to-bottom footer behavior so it always flows as a normal block element.
  • `d13595c82` — Footer responsive cleanup + navbar spacing: removed the docs-page-only `margin-left: 307px` scoping so home and docs footers share one ruleset, and fixed a subtle bug where the search and color-mode toggle were touching at narrow widths because I'd been targeting `.navbar__search` (doesn't exist) instead of `.navbarSearchContainer` (the actual wrapper Docusaurus emits).

The AGENTS.md / page-header-bg.png additions are split into #671 (now out of draft) per your request.

LindsayAuch added a commit that referenced this pull request May 8, 2026
AGENTS.md mirrors CLAUDE.md's project instructions for the OpenAI
Codex agent so both agent harnesses can find their guidance.

Split out from #669 per @mike-solomon's review feedback.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
mike-solomon pushed a commit that referenced this pull request May 8, 2026
AGENTS.md mirrors CLAUDE.md's project instructions for the OpenAI
Codex agent so both agent harnesses can find their guidance.

Split out from #669 per @mike-solomon's review feedback.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@mike-solomon mike-solomon left a comment

Choose a reason for hiding this comment

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

I think something has gotten messed up with the spacing of the header. Here is what it looks like for me locally. Padding / margins are missing for the banner and header. Also note that the dark/light mode is overlapping with the text.

Image

Current site for comparison:
image

LindsayAuch and others added 3 commits May 8, 2026 16:37
… room

@mike-solomon flagged that the announcement banner and primary navbar
looked smashed together on this branch vs production. I had removed
the desktop @media rule that redefined --ifm-navbar-height as
calc(37px + secondary-nav-height), thinking the +secondary-nav in
the explicit formulas was a double-count bug. Turns out the extra
~48px is intentional breathing room between the navbar stack and
the article column.

Restored the redefinition with a comment explaining why the
duplication is on purpose. Mobile (<997px) still gets
--ifm-secondary-nav-height: 0px so the hamburger / breadcrumbs sit
close together.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mike-solomon
Copy link
Copy Markdown
Contributor

Things still look weird to me as an fyi:
Screen Shot 2026-05-11 at 8 26 46 AM

@LindsayAuch
Copy link
Copy Markdown
Contributor Author

made some changes EOD Friday and Sat. Can you see them? @mike-solomon

@mike-solomon
Copy link
Copy Markdown
Contributor

made some changes EOD Friday and Sat. Can you see them? @mike-solomon

I pulled the latest changes and rebuilt the site and saw no changes compared to last week. It looks like you maybe made some changes and then reverted them. @LindsayAuch

@LindsayAuch
Copy link
Copy Markdown
Contributor Author

@mike-solomon you're right — the branch was stale. PR #669 hadn't been brought forward through several main merges (PR #671 / #678 / #679 / cli releases / docs auto-updates), so even though there were design-polish commits on this branch, the net diff vs main effectively reverted recent work, which made the local build look unchanged when you rebuilt against latest main.

Just pushed a merge of latest main into this branch (8c7c3a6e3). Now git diff main only shows the actual unique work:

src/css/custom.css                         | 17 +++++++---
src/theme/DocCard/styles.module.css        |  2 +-
src/theme/Footer/styles.module.css         | 61 +++++++++++++-----------------
src/theme/Navbar/Content/styles.module.css | 11 +++++-
src/theme/Navbar/Logo/styles.module.css    | 11 +-----

Heads-up: the footer + navbar-spacing portions of this PR overlap with #681 (more thorough tiered responsive logic). #681 supersedes those parts. Once #681 merges, I can rebase this down to just the logo size + DocCard hover changes to keep the diff focused — say the word and I'll do that.

@mike-solomon
Copy link
Copy Markdown
Contributor

mike-solomon commented May 12, 2026

Hey there - there are still no changes to the banner spacing and dark/light mode button even with the latest stuff merged in:
Screen Shot 2026-05-12 at 8 21 44 AM

I would encourage you to reach out for help if you don't understand what's going on. Copying/pasting Claude can only get so far.

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