$heading: rgba(255, 255, 255, 0.6); $separator: rgba(255, 255, 255, 0.2); %subheading { color: $heading; font-size: 0.8rem; font-weight: 400; margin: 0; } @mixin header { display: grid; grid-template-areas: "icon primary" "icon secondary"; grid-template-rows: 1fr 1fr; grid-template-columns: 3rem 1fr; padding: 1rem; .site-name { grid-area: primary; padding-left: 1rem; font-size: 1.25rem; font-weight: unset; color: var(--site-primary); margin: 0; white-space: nowrap; overflow-x: hidden; text-overflow: ellipsis; } .admin-name { grid-area: secondary; color: white; padding-left: 1rem; @extend %subheading; opacity: 0.75; white-space: nowrap; overflow-x: hidden; text-overflow: ellipsis; } .site-icon { grid-area: icon; display: flex; background-color: var(--site-primary); color: var(--site-on-primary); width: 3rem; height: 3rem; align-items: center; justify-content: space-around; text-transform: capitalize; font-size: 2rem; border-radius: 0.25rem; } } %navigation { background: black; color: white; padding-bottom: 2rem; --site-link: white; > * { transition: opacity 0.25s; } &:not([aria-expanded]) { > * { opacity: 0; } } header { @include header; border-bottom: 1px solid $separator; } ul, li { padding: 0; list-style: none; font-size: var(--heading--h6); } .filter { margin: 1rem calc(1rem - 5px) 0; position: relative; input { width: 100%; border: none; border-radius: 1px; } // keyboard shortcut &::after { content: "G"; position: absolute; display: block; top: 4px; bottom: 4px; right: 4px; width: auto; border-radius: 2px; border: 1px solid #aaa; color: #888; padding: 6px 0.3rem 0 0.3rem; font-size: 0.8rem; pointer-events: none; } &:has(input:focus), &:has(input:hover) { &::after { opacity: 0; } } } li > span { display: block; padding: 1.25rem 1rem 0.25rem; color: $heading; } > ul > li > span { border-top: 1px solid $separator; margin-top: 1rem; padding: 1.25rem 1rem 0.25rem; @extend %subheading; } li li li > a[href] { padding-left: 2.5rem; } li > a[href] { display: block; padding: 0.75rem 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } li > a[href]:hover, li > a[href]:focus { background: rgba(255, 255, 255, 0.2); text-decoration: none; } } .navigation-collapse { width: 2rem; border-radius: 50%; margin-top: 1rem; justify-self: right; align-self: start; background-color: white; box-shadow: 0px 1px 7px 2px rgba(0, 0, 0, 0.1); visibility: hidden; opacity: 0; transform: translateX(50%); transition: opacity 0.25s, background-color 0.25s; cursor: pointer; nav[aria-expanded] + & { transform: translateX(50%) rotate(180deg); } nav:hover + &, &:hover { visibility: visible; opacity: 1; } &:hover { background-color: var(--site-primary); } }