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

Fixing header height #1102

Merged
merged 1 commit into from
Jan 7, 2023
Merged

Fixing header height #1102

merged 1 commit into from
Jan 7, 2023

Conversation

choldgraf
Copy link
Collaborator

@choldgraf choldgraf commented Jan 7, 2023

I realized that our header height was not properly being set, and this was causing h1 and h2 titles to be too-close to the header when clicking anchor links.

The problem was that we defined a --pst-header-height variable, but we did not force the header height to max-out at that variable. So the content of the header was causing it to expand in height. This made it look correct to us, but technically the header height wasn't the variable we had set. Because the anchors were set to a padding relative to the header height variable, their positioning was wrong.

So this PR forces the header to have the height we want, and increases the height from 3rem to 4rem which mimics the behavior we are used to. It also adds vertical padding to the navbar brand div so that it doesn't take too much space.

Old behavior:

chrome_8dEdCvfDRo

New behavior:

chrome_hgMDRkH54z

Copy link
Collaborator

@12rambau 12rambau left a comment

Choose a reason for hiding this comment

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

+1 for me. I checked a nearly empty page to verify that the footer was still visible and it didn't changed anything in this one so that's perfect: https://pydata-sphinx-theme--1102.org.readthedocs.build/en/1102/examples/persistent-search-field.html

@choldgraf choldgraf merged commit c0481b5 into pydata:main Jan 7, 2023
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