Skip to content

fix: stop the closed search box from covering the GitHub button - #69

Merged
shenxianpeng merged 1 commit into
mainfrom
bugfix/search-covers-github-button
Sep 29, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
bugfix/search-covers-github-button

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

On the home page, clicking the left part of the GitHub button in the header focused the search input and opened search, and hovering it showed the browser's "Please fill out this field" tooltip. Only the right part of the button opened GitHub.

Closed, the search form is a 44px button, but Material's .md-search__input and .md-search__suggest keep their 2.2rem side padding, so they are 88px wide and stick out 44px to the right. The input has z-index: 2, so the overflow sat on top of the GitHub button next to it. This clips the closed form with overflow: hidden; the open form (560px) is unchanged.

Checked with mkdocs serve at 965, 1024 and 1440px wide: elementFromPoint across the GitHub button now returns the link at every point (before: the search input over its left 30%), the search icon still opens search, and a query still returns results. Inner pages don't use this header.

On the home page, clicking the left part of the GitHub button in the header focused the search input and opened search, and hovering it showed the browser's "Please fill out this field" tooltip. Only the right part of the button opened GitHub.

Closed, the search form is a 44px button, but Material's `.md-search__input` and `.md-search__suggest` keep their `2.2rem` side padding, so they are 88px wide and stick out 44px to the right. The input has `z-index: 2`, so the overflow sat on top of the GitHub button next to it. This clips the closed form with `overflow: hidden`; the open form (560px) is unchanged.

Checked with `mkdocs serve` at 965, 1024 and 1440px wide: `elementFromPoint` across the GitHub button now returns the link at every point (before: the search input over its left 30%), the search icon still opens search, and a query still returns results. Inner pages don't use this header.
@netlify

netlify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cpp-linter-github-io ready!

Name Link
🔨 Latest commit 214276b
🔍 Latest deploy log https://app.netlify.com/projects/cpp-linter-github-io/deploys/6abbe3165b381500080fd79e
😎 Deploy Preview https://deploy-preview-69--cpp-linter-github-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@shenxianpeng shenxianpeng added the bug Something isn't working label Sep 29, 2026
@shenxianpeng
shenxianpeng merged commit 60d085f into main Sep 29, 2026
7 checks passed
@shenxianpeng
shenxianpeng deleted the bugfix/search-covers-github-button branch September 29, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant