@charset "utf-8"; $header-z-index: 100; header { position: sticky; top: 0; z-index: $header-z-index; height: var(--header-height); overflow: hidden; background-color: var(--primary-background-color); font-size: var(--nav-font-size); color: var(--primary-text-color); display: flex; flex-direction: row; padding-right: 10px; box-shadow: 0 0 2px var(--shadow-color-light); margin: 0; a, a:visited { text-decoration: none; color: var(--primary-text-color); // Vertically center text display: flex; align-items: center; } #toggle_sidebar_btn { margin-right: 10px; background-color: var(--primary-background-color); } @media print { #toggle_sidebar_btn { display: none; } } } nav.sidebar { position: fixed; top: var(--header-height); left: 0; bottom: 0; width: var(--nav-width); display: flex; flex-direction: column; opacity: 0; transform: scale(0, 1) translate(-30px, 0); color: var(--primary-text-color); background-color: var(--primary-background-color); box-shadow: 0 0 2px var(--shadow-color-light); padding: 10px; z-index: $header-z-index - 1; &.open { transform: scale(1, 1); opacity: 1; } transform-origin: left; transition: opacity 0.5s ease, transform 0.5s ease, width 0.5s ease; // Container with search box and button > .search-container { display: flex; flex-direction: row; input { flex-grow: 1; flex-shrink: 1; } } & > .pinned-pages { flex-grow: 1; flex-shrink: 1; min-height: 30px; } & > .search-results-container, & > .pinned-pages { overflow: auto; } & > .search-results-container > .search-results { &.hidden { display: none; } .results-description { color: var(--text-color-faint); border-bottom: 1px solid var(--line-color-light); margin-right: 30px; } // Context for each result. .context { margin-left: 15px; margin-right: 20px; padding-left: 5px; color: var(--text-color-faint); border-left: 1px solid var(--line-color-light); text-decoration: none; word-wrap: anywhere; } // Search result link a { background-color: transparent; transition: background-color 0.2s ease; display: list-item; padding: 5px; color: var(--primary-text-color); } a:hover, a:focus-visible { background-color: var(--selected-item-bg-color); } } & > .search-results-container > ul.search-results, & > ul.pinned-pages { list-style: none; padding-left: 0; a { text-decoration: none; display: block; color: var(--primary-text-color); } li, & > a { padding: 4px; border-bottom: 1px solid var(--line-color-light); a:hover { text-decoration: underline; } &.current_page { background-color: var(--selected-item-bg-color); } &.current_page a { color: var(--selected-item-fg-color); font-weight: bold; text-align: end; } } } footer { font-style: italic; margin-left: 22px; margin-right: 22px; margin-top: 30px; color: var(--text-color-faint); } } // To make space for the navigation bar, add padding to // hash links. See // https://gomakethings.com/how-to-prevent-anchor-links-from-scrolling-behind-a-sticky-header-with-one-line-of-css/ .main-container * { scroll-margin-top: 2.5em; }