Repository navigation
Commit 60d085f
authored
fix: stop the closed search box from covering the GitHub button (#69)
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.1 parent a104953 commit 60d085f
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
257 | 266 | | |
258 | 267 | | |
259 | 268 | | |
| |||
0 commit comments