Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix icon position of sidebar-search-container #47

Merged
merged 2 commits into from
Nov 28, 2020

Conversation

bastimeyer
Copy link
Contributor

If a customized html_sidebars list is used and scroll-start is set before search, then scrolling down the sidebar will also scroll the searchbox's icon, as its position is set to absolute. By setting the position of the searchbox container to relative, the icon stays at its intended position while scrolling.

Example of the sidebar scrolled down by a bit and the icon having a vertical offset:
image

@pradyunsg pradyunsg merged commit 15ac125 into pradyunsg:main Nov 28, 2020
@bastimeyer
Copy link
Contributor Author

For some reason, the position: relative property is not included in the built furo.css file of beta20 wheel file. It is present on the theme's docs, though, which is weird.

$ curl -s 'https://pradyunsg.me/furo/_static/styles/furo.css' | grep -Eo '\.sidebar-search-container\{[^}]+\}'
.sidebar-search-container{background:var(--color-sidebar-search-background)}
.sidebar-search-container{display:flex;align-items:center;margin-top:var(--sidebar-search-space-above);position:relative}
$ curl -o furo-b20.whl 'https://files.pythonhosted.org/packages/b0/9f/d00f11e59f5972c19b1de1d3fce06c51aaa1067299cdba5fcc2b759a05f8/furo-2020.12.9b20-py3-none-any.whl'
$ unzip -p furo-b20.whl furo/theme/static/styles/furo.css | grep -Eo '\.sidebar-search-container\{[^}]+\}'
.sidebar-search-container{background:var(--color-sidebar-search-background)}
.sidebar-search-container{display:flex;align-items:center;margin-top:var(--sidebar-search-space-above)}

@pradyunsg
Copy link
Owner

It is present on the theme's docs, though, which is weird.

It is. :/

I built it in a clean environment, so... that's confusing. I've gone ahead and cut beta21, with the correct files now. I'll debug further later. :)

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