Skip to content

Commit

Permalink
Sticky breadcrumb and sidebar navs
Browse files Browse the repository at this point in the history
Both the breadcrumb (parent) and sidebar (sibling) navs provide key context while reading the page. Making them sticky (and optionally giving the sidebar nav its own scroll context) makes their context available to the whole page, not just the start.
  • Loading branch information
davidmcguiredesign authored Jan 5, 2025
1 parent eff1652 commit e0f64d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions styles/theme-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,10 @@ pre.info {
padding:.75rem 1.5rem 1.5rem;
-moz-box-sizing:border-box;
box-sizing:border-box;
position: sticky;
top: 3rem;
max-height: calc(100vh - 3rem);
overflow: auto;
}
#layout-content {
padding:1.5rem;
Expand Down Expand Up @@ -1352,6 +1356,10 @@ div.soft-deprecation-notice blockquote.sidebar {
@media (min-width: 768px) {
#breadcrumbs {
display:block;
position: sticky;
top: 0px;
background: var(--dark-grey-color);
z-index: 1;
}
#intro .background,
aside.tips,
Expand All @@ -1363,6 +1371,7 @@ div.soft-deprecation-notice blockquote.sidebar {
#layout-content {
float:left;
width:75%;
border-top-left-radius: 1rem;
}
}

Expand Down

0 comments on commit e0f64d4

Please sign in to comment.