#site-nav { -webkit-backdrop-filter: var(--blur); position: sticky; top: 1rem; z-index: 999; backdrop-filter: var(--blur); margin: 1rem auto; box-shadow: var(--edge-highlight), 0 0.75rem 1.5rem -1rem rgb(0 0 0 / 0.5); border-radius: 1.625rem; background-color: var(--nav-bg); max-width: 90%; @media only screen and (max-width: 480px) { position: static; } nav { padding: 0.5rem; #main-content { -webkit-backdrop-filter: var(--blur); position: absolute; top: 0; left: 50%; transform: translateX(-50%); opacity: 0; z-index: 999; backdrop-filter: var(--blur); transition: var(--transition); box-shadow: var(--edge-highlight), 0 0.75rem 1.5rem -1rem rgb(0 0 0 / 0.5); border-radius: 999px; background-color: var(--nav-bg); padding: 0.5rem 0.75rem; pointer-events: none; line-height: 1.25; text-decoration: none; &:focus { top: calc(100% + 0.5rem); opacity: 1; } } ul { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.25rem; margin: 0; padding: 0; li { display: flex; line-height: 1.25; list-style: none; @media only screen and (max-width: 480px) { &:not(.circle) { flex: 0 0 100%; } } &#home { position: relative; margin-inline-end: 0.625rem; &::after { position: absolute; top: -0.125rem; right: -0.5rem; background-color: var(--fg-muted-2); width: max(1px, 0.0625em); height: calc(100% + 0.25rem); content: ""; :root[dir*="rtl"] & { right: unset; left: -0.5rem; @media only screen and (max-width: 480px) { left: -0.125rem; } } @media only screen and (max-width: 480px) { display: none; } } a { color: var(--fg-muted-5); font-weight: 800; &.active { color: var(--primary-color); &:hover { color: var(--contrast-color); .icon { background-color: var(--contrast-color); } } .icon { background-color: var(--primary-color); } } .icon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 .361a2.2 2.2 0 0 0-1.41.51L2.129 4.59A3.14 3.14 0 0 0 1 7v6c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V7c0-.93-.414-1.813-1.129-2.41L9.411.87A2.2 2.2 0 0 0 8 .361m0 2.002a.2.2 0 0 1 .129.047l4.46 3.719c.263.215.411.535.411.871v6c0 .547-.453 1-1 1h-2V9c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1v5H4c-.547 0-1-.453-1-1V7c0-.336.148-.656.41-.871L7.871 2.41A.2.2 0 0 1 8 2.363'/%3E%3C/svg%3E"); -webkit-mask-image: var(--icon); vertical-align: -0.125em; mask-image: var(--icon); transition: var(--transition); margin-inline-end: 0.25rem; background-color: var(--fg-muted-5); width: 1rem; height: 1rem; } } @media only screen and (max-width: 480px) { margin-inline-end: 0; } } a, &#search button, &#language-switcher summary, &#theme-switcher summary, &#theme-switcher button, details summary { &:hover { box-shadow: var(--edge-highlight); background-color: var(--fg-muted-1); } &:active { transform: scale(var(--active)); } } a { position: relative; flex: 1; transition: var(--transition); border-radius: 999px; padding: 0.5rem 0.75rem; color: var(--fg-muted-4); line-height: 1.25; text-align: center; text-decoration: none; &:hover { text-decoration: none; } &.active { box-shadow: var(--edge-highlight); background-color: var(--primary-color-alpha); color: var(--primary-color); &:hover { background-color: var(--primary-color); color: var(--contrast-color); .icon { background-color: var(--contrast-color); } } .icon { background-color: var(--primary-color); } } } &#search button, &#language-switcher summary, &#theme-switcher summary, &#theme-switcher button, &#feed a, &#repo a { padding: 0.5rem 0.625rem; .icon { vertical-align: -0.125em; transition: var(--transition); background-color: var(--fg-muted-4); width: 1rem; height: 1rem; } } button { -webkit-appearance: none; appearance: none; transition: var(--transition); cursor: pointer; border: none; border-radius: 999px; background-color: transparent; font-weight: bold; font-size: 1rem; } &#search .icon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M6.57.063c-3.578 0-6.5 2.921-6.5 6.5 0 3.578 2.922 6.5 6.5 6.5a6.46 6.46 0 0 0 3.83-1.256l2.975 2.974c.957.938 2.363-.5 1.406-1.437l-2.96-2.961a6.46 6.46 0 0 0 1.25-3.82c0-3.579-2.923-6.5-6.5-6.5m0 2c2.5 0 4.5 2.003 4.5 4.5 0 2.5-2 4.5-4.5 4.5-2.496 0-4.5-2-4.5-4.5 0-2.497 2.004-4.5 4.5-4.5'/%3E%3C/svg%3E"); -webkit-mask-image: var(--icon); mask-image: var(--icon); :root[dir*="rtl"] & { transform: scaleX(-100%); } } &#feed .icon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M1.988 1.988V3c.008.547.453.984 1 .988.004-.004.008-.004.012-.004v.028A8.977 8.977 0 0 1 11.988 13a.991.991 0 0 0 1 .984h1V13h-.004c0-.004 0-.004.004-.008C13.984 7.02 9.184 2.148 3.242 2.02A1.004 1.004 0 0 0 3 1.988v-.004zm0 4V7c.008.547.453.984 1 .988.004-.004.008-.004.012-.004V8a4.985 4.985 0 0 1 4.996 4.844 1.002 1.002 0 0 0 .988 1.145c.008-.005.012-.005.016-.005v.004h.984V13H10c0-3.793-3.047-6.898-6.82-6.992 0-.004-.004-.004-.004-.004A.892.892 0 0 0 3 5.988v-.004zm2 4a1.999 1.999 0 1 0-.002 3.998 1.999 1.999 0 0 0 .002-3.998m0 0'%3E%3C/path%3E%3C/svg%3E"); -webkit-mask-image: var(--icon); mask-image: var(--icon); :root[dir*="rtl"] & { transform: scaleX(-100%); } } &#repo .icon { // --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M5 4c-.309 0-.55.09-.75.281L.594 8l3.656 3.719c.2.191.441.281.75.281h1v-1c0-.258-.129-.527-.312-.719L3.438 8l2.25-2.281C5.87 5.527 6 5.258 6 5V4zm5 0v1c0 .258.129.527.313.719L12.563 8l-2.25 2.281c-.184.192-.313.461-.313.719v1h1c.309 0 .55-.09.75-.281L15.406 8 11.75 4.281C11.55 4.09 11.309 4 11 4z'/%3E%3C/svg%3E"); --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 0a1 1 0 0 0-.707.293L5.707 1.875l5.238 5.234c.176-.07.364-.109.555-.109A1.5 1.5 0 1 1 10 8.5q0-.276.102-.535L8.05 5.915v4.19a1.5 1.5 0 1 1-1-.035V4.914L4.859 2.727.293 7.293a1 1 0 0 0 0 1.414l7 7a1 1 0 0 0 1.414 0l7-7a1.007 1.007 0 0 0 0-1.414l-7-7A1 1 0 0 0 8 0m0 0'/%3E%3C/svg%3E"); -webkit-mask-image: var(--icon); mask-image: var(--icon); } details { position: relative; flex: 1; box-shadow: none; border-radius: 0; background-color: transparent; padding: 0; summary { transition: var(--transition); border-radius: 999px; background-color: transparent; padding: 0.5rem 0.75rem; color: var(--fg-muted-4); font-weight: bold; line-height: 1.25; list-style: none; text-align: center; text-decoration: none; &::marker, &::-webkit-details-marker { display: none; } .icon.arrow { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='m2.293 6.707 5 5a1 1 0 0 0 1.414 0l5-5a1 1 0 1 0-1.414-1.414L8 9.586 3.707 5.293a1 1 0 1 0-1.414 1.414m0 0'/%3E%3C/svg%3E"); -webkit-mask-image: var(--icon); vertical-align: -0.125em; mask-image: var(--icon); transition: var(--transition); margin-inline-end: 0.25rem; background-color: var(--fg-muted-4); width: 1rem; height: 1rem; } } &[open] { .icon.arrow { transform: scaleY(-100%); } ul { animation: dropdown-open var(--transition); @keyframes dropdown-open { from { transform: translate(-50%, 0); opacity: 0; } } } } ul { -webkit-backdrop-filter: var(--blur); text-wrap: nowrap; position: absolute; left: 50%; transform: translate(-50%, 1rem); z-index: 1; backdrop-filter: var(--blur); box-shadow: var(--edge-highlight), 0 0.75rem 1.5rem -1rem rgb(0 0 0 / 0.5); border-radius: calc(var(--rounded-corner) + 0.25rem); background-color: var(--nav-bg); padding: 0.25rem; @media only screen and (max-width: 480px) { transform: translate(-50%, 0.5rem); } li { width: 100%; a { border-radius: var(--rounded-corner); text-align: start; } } } } &#language-switcher .icon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M3.98 1v3H1v2h2.947a4.8 4.8 0 0 1-.592 1.871c-.425.758-1.101 1.488-2.062 2.45l1.414 1.413c.92-.92 1.703-1.728 2.283-2.697.38.632.844 1.196 1.377 1.768l.668-2.309a6 6 0 0 1-.41-.625A4.75 4.75 0 0 1 6.033 6h1.53l.511-2H6V1zm5.24 1L6 15h2l.781-3h4.438L14 15h2L12.781 2zm1.562 2h.438l1.5 6H9.28z'/%3E%3C/svg%3E"); -webkit-mask-image: var(--icon); mask-image: var(--icon); } &#theme-switcher { ul { flex-wrap: nowrap; border-radius: 999px; li { flex: 1; } } #theme-system .icon, .icon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 0C3.594 0 0 3.594 0 8s3.594 8 8 8 8-3.594 8-8-3.594-8-8-8m0 1.941c3.36 0 6.059 2.7 6.059 6.059s-2.7 6.059-6.059 6.059zm0 0'/%3E%3C/svg%3E"); -webkit-mask-image: var(--icon); mask-image: var(--icon); :root[dir*="rtl"] & { transform: scaleX(-100%); } } #theme-light .icon, .icon.light { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8.004-.008a1 1 0 0 0-1 1v1a1 1 0 1 0 2 0v-1c0-.554-.445-1-1-1M3.053 2.035a1 1 0 0 0-.26.035.994.994 0 0 0-.45 1.672l.708.707a1 1 0 1 0 1.414-1.414l-.707-.707a1 1 0 0 0-.705-.293m9.9.012a1 1 0 0 0-.707.293l-.707.707a1 1 0 1 0 1.414 1.414l.707-.707a1 1 0 0 0-.707-1.707M8 4C5.785 4 4 5.785 4 8s1.785 4 4 4 4-1.785 4-4-1.785-4-4-4m0 2c1.098 0 2 .902 2 2s-.902 2-2 2-2-.902-2-2 .902-2 2-2m-7.004.984a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM14 7c-.55 0-1 .45-1 1s.45 1 1 1h1c.55 0 1-.45 1-1s-.45-1-1-1zM3.748 11.234a1 1 0 0 0-.705.293l-.711.707a1.007 1.007 0 0 0 0 1.414c.39.391 1.027.391 1.418 0l.707-.707a1 1 0 0 0-.709-1.707m8.49.006q-.131 0-.261.033a1.01 1.01 0 0 0-.707.711 1 1 0 0 0 .261.965l.707.707a.995.995 0 0 0 1.672-.445 1 1 0 0 0-.258-.969l-.707-.707a1 1 0 0 0-.707-.295m-4.246 1.756c-.554 0-1 .445-1 1v1a1 1 0 1 0 2 0v-1a1 1 0 0 0-1-1'/%3E%3C/svg%3E"); -webkit-mask-image: var(--icon); mask-image: var(--icon); } #theme-dark .icon, .icon.dark { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M.918 8.004a7.072 7.072 0 0 0 14.102.793 1.01 1.01 0 0 0-.457-.957 1 1 0 0 0-1.063-.004 3.9 3.9 0 0 1-2.031.578 3.89 3.89 0 0 1-3.883-3.883c0-.715.203-1.422.578-2.031a1 1 0 0 0-.004-1.062c-.207-.32-.578-.5-.957-.458A7.07 7.07 0 0 0 .918 8.004M5.586 4.53a5.877 5.877 0 0 0 8.965 5.004l-1.52-.96a5.09 5.09 0 0 1-5.035 4.507 5.09 5.09 0 0 1-5.078-5.078 5.09 5.09 0 0 1 4.508-5.035l-.961-1.52a5.9 5.9 0 0 0-.88 3.082m0 0'/%3E%3C/svg%3E"); -webkit-mask-image: var(--icon); mask-image: var(--icon); :root[dir*="rtl"] & { transform: scaleX(-100%); } } } } } } #search-container { transform: translateY(-2.75rem); opacity: 0; transition: var(--transition); padding: 0 0.5rem 0; height: 0; pointer-events: none; &.active { transform: translateY(0); opacity: 1; padding: 0 0.5rem 0.5rem; height: 2.75rem; pointer-events: all; } #search-bar { box-shadow: var(--edge-highlight); border: none; border-radius: 999px; background-image: none; background-color: var(--fg-muted-1); padding: 0.5rem 0.75rem; width: 100%; color: inherit; font-size: 1rem; &::placeholder { opacity: 1; color: var(--fg-muted-4); } } #search-results { -webkit-backdrop-filter: var(--blur); display: none; position: absolute; top: calc(100% + 0.5rem); left: 0; flex-direction: column; gap: 0.5rem; backdrop-filter: var(--blur); box-shadow: var(--edge-highlight), 0 0.75rem 1.5rem -1rem rgb(0 0 0 / 0.5); border-radius: calc(var(--rounded-corner) + 0.5rem); background-color: var(--nav-bg); padding: 0.5rem; width: 100%; max-height: 50vh; overflow: auto; .item { display: inline-flex; flex-direction: column; box-shadow: var(--edge-highlight); border-radius: var(--rounded-corner); background-color: var(--fg-muted-1); padding: 0.5rem; a { line-height: 1.25; &::after { content: " →"; :root[dir*="rtl"] & { content: " ←"; } } } div { margin-block-start: 0.5rem; border-block-start: max(1px, 0.0625rem) solid var(--fg-muted-2); padding-block-start: 0.25rem; color: var(--fg-muted-5); strong { color: var(--fg-color); } } } } } }