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

Sticky in-manual navs #1197

Open
davidmcguiredesign opened this issue Dec 31, 2024 · 2 comments · May be fixed by #1198
Open

Sticky in-manual navs #1197

davidmcguiredesign opened this issue Dec 31, 2024 · 2 comments · May be fixed by #1198

Comments

@davidmcguiredesign
Copy link

davidmcguiredesign commented Dec 31, 2024

Seeing a page’s position within the manual is useful even when halfway down a long page.

Using a style injection extension, I added some simple CSS to make the breadcrumb nav and (because I don’t know its real name) the sibling-chapter nav sticky. The styles have worked so well for me that I think others might benefit from them becoming a standard part of the PHP site.

#layout .layout-menu {
    position: sticky;
    top: 3rem; 
    max-height: calc(100vh - 3rem);
    overflow: auto;
}

#breadcrumbs {
    position: sticky;
    top: 0px;
    background: var(--dark-grey-color);
    z-index: 1;
}

@media (min-width: 768px) {
    #layout-content {
        border-top-left-radius: 1rem; /* [1] */
    }
}

[1] The rounded corner subliminally signals that one has reached the top of the page. The radius also matches the new search modal.

@saundefined
Copy link
Member

@davidmcguiredesign thanks!

Feel free to open a PR :)

@davidmcguiredesign
Copy link
Author

Done! PR1198

@sy-records sy-records linked a pull request Jan 5, 2025 that will close this issue
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 a pull request may close this issue.

2 participants