|
| 1 | + |
| 2 | +/* Search Box */ |
| 3 | +@media (width < 800px) { |
| 4 | + #search-and-buttons { |
| 5 | + width: calc(100% - 50px) !important; |
| 6 | + } |
| 7 | +} |
| 8 | + |
| 9 | +site-search button { |
| 10 | + background-color: var(--color-opacity-5); |
| 11 | + border: 1px solid var(--color-opacity-10); |
| 12 | + border-radius: 6px; |
| 13 | + color: var(--color-gray-2); |
| 14 | + height: 100%; |
| 15 | + max-width: none; |
| 16 | + min-height: 44px; |
| 17 | + padding: 6px 12px; |
| 18 | +} |
| 19 | + |
| 20 | +/* Search Box NOT inside Dialog */ |
| 21 | +site-search>button { |
| 22 | + display: flex; |
| 23 | + width: 100%; |
| 24 | +} |
| 25 | + |
| 26 | +site-search button svg { |
| 27 | + color: var(--color-gray-1); |
| 28 | +} |
| 29 | + |
| 30 | +/* Search Dialog Box */ |
| 31 | +site-search dialog[open] { |
| 32 | + background: var(--color-dialog-bg); |
| 33 | + border-radius: .5rem; |
| 34 | + display: flex; |
| 35 | + height: max-content; |
| 36 | + margin: 4rem auto auto; |
| 37 | + max-height: calc(100% - 8rem); |
| 38 | + max-width: 40rem; |
| 39 | + min-height: 15rem; |
| 40 | + width: 90%; |
| 41 | +} |
| 42 | + |
| 43 | +button[data-close-modal] { |
| 44 | + color: black; |
| 45 | + display: none; |
| 46 | +} |
| 47 | + |
| 48 | +site-search .dialog-frame { |
| 49 | + overflow-x: hidden; |
| 50 | + padding: 1.5rem; |
| 51 | +} |
| 52 | + |
| 53 | +#starlight__search > div:nth-of-type(2) { |
| 54 | + display: none; |
| 55 | +} |
| 56 | + |
| 57 | +site-search .pagefind-ui { |
| 58 | + color: oklch(0.37 0.013 285.805); |
| 59 | +} |
| 60 | + |
| 61 | +site-search .pagefind-ui__drawer { |
| 62 | + display: flex; |
| 63 | + flex-direction: row; |
| 64 | + flex-wrap: wrap; |
| 65 | +} |
| 66 | + |
| 67 | +site-search .pagefind-ui__results { |
| 68 | + padding-left: 0; |
| 69 | +} |
| 70 | + |
| 71 | +site-search .pagefind-ui__result { |
| 72 | + padding: 20px 10px; |
| 73 | +} |
| 74 | + |
| 75 | +/* Site Search Dark Mode */ |
| 76 | +html[data-theme="dark"] site-search input, |
| 77 | +html[data-theme="dark"] site-search .pagefind-ui__result-link { |
| 78 | + color: rgb(19, 24, 36); |
| 79 | +} |
| 80 | + |
| 81 | + |
| 82 | +/* |
| 83 | + * Starlight Overrides |
| 84 | + * |
| 85 | + * Context: Starlight components apply different styles based on dark/light mode state. |
| 86 | + * This causes visual issues because the docs pages have dark mode support, but the homepage nav does not. |
| 87 | + * This override fixes an issue on the homepage nav by styling CMD+K in a consistent way across all pages in both * modes. |
| 88 | + * |
| 89 | + * Future Considerations: |
| 90 | + * - If homepage gains dark mode support, this override may need adjustment |
| 91 | + * - Consider if a more systematic theming approach is needed long-term |
| 92 | + */ |
| 93 | +site-search button kbd { |
| 94 | + background-color: transparent; |
| 95 | + font-size: var(--sl-text-sm); |
| 96 | + gap: 0; |
| 97 | + margin: 0 0 0 auto; |
| 98 | +} |
| 99 | + |
| 100 | +.pagefind-ui__message { |
| 101 | + padding: 1.5em 0; |
| 102 | + height: auto; |
| 103 | +} |
| 104 | + |
| 105 | +#starlight__search .pagefind-ui__form:before { |
| 106 | + background-color: black !important; |
| 107 | +} |
| 108 | + |
| 109 | +input.pagefind-ui__search-input { |
| 110 | + background-color: white; |
| 111 | + color: black; |
| 112 | + border: 1px solid oklch(0.871 0.006 286.286); |
| 113 | + border-radius: 8px; |
| 114 | + max-width: 590px; |
| 115 | + padding-left: 50px; |
| 116 | + width: -webkit-fill-available; |
| 117 | +} |
| 118 | + |
| 119 | +input.pagefind-ui__search-input::placeholder { |
| 120 | + color: #666; |
| 121 | +} |
| 122 | + |
| 123 | +input.pagefind-ui__search-input:focus { |
| 124 | + outline: 2px solid #448daf; |
| 125 | + outline-offset: 2px; |
| 126 | +} |
| 127 | + |
| 128 | +.pagefind-ui__search-clear { |
| 129 | + background-color: transparent; |
| 130 | + border: none; |
| 131 | + right: 0; |
| 132 | +} |
| 133 | + |
| 134 | +.pagefind-ui__search-clear:before { |
| 135 | + background-color: black; |
| 136 | + content: ""; |
| 137 | + display: block; |
| 138 | + height: 100%; |
| 139 | + margin-bottom: 20px; |
| 140 | + width: 100%; |
| 141 | + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m13.41 12 6.3-6.29a1 1 0 1 0-1.42-1.42L12 10.59l-6.29-6.3a1 1 0 0 0-1.42 1.42l6.3 6.29-6.3 6.29a1 1 0 0 0 .33 1.64 1 1 0 0 0 1.09-.22l6.29-6.3 6.29 6.3a1 1 0 0 0 1.64-.33 1 1 0 0 0-.22-1.09L13.41 12Z'/%3E%3C/svg%3E") center / 100% no-repeat; |
| 142 | + mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m13.41 12 6.3-6.29a1 1 0 1 0-1.42-1.42L12 10.59l-6.29-6.3a1 1 0 0 0-1.42 1.42l6.3 6.29-6.3 6.29a1 1 0 0 0 .33 1.64 1 1 0 0 0 1.09-.22l6.29-6.3 6.29 6.3a1 1 0 0 0 1.64-.33 1 1 0 0 0-.22-1.09L13.41 12Z'/%3E%3C/svg%3E") center / 100% no-repeat; |
| 143 | +} |
| 144 | + |
| 145 | +#starlight__search .pagefind-ui__result-title:not(:where(.pagefind-ui__result-nested *)), |
| 146 | +#starlight__search .pagefind-ui__result-nested, |
| 147 | +.pagefind-ui__result-title, |
| 148 | +.pagefind-ui__result-nested { |
| 149 | + background-color: transparent; |
| 150 | +} |
| 151 | + |
| 152 | +.pagefind-ui__result { |
| 153 | + background: white; |
| 154 | + color: black; |
| 155 | + border-radius: 8px; |
| 156 | + margin-bottom: 20px; |
| 157 | +} |
| 158 | + |
| 159 | +/* Fix search result icons - same approach as text fix */ |
| 160 | +.pagefind-ui__result svg, |
| 161 | +.pagefind-ui__result svg path { |
| 162 | + fill: black; |
| 163 | +} |
| 164 | + |
| 165 | +.pagefind-ui__result-link, |
| 166 | +.pagefind-ui__result-excerpt { |
| 167 | + color: black; |
| 168 | +} |
| 169 | + |
| 170 | +.pagefind-ui__result-title a { |
| 171 | + color: black; |
| 172 | +} |
| 173 | + |
| 174 | +.pagefind-ui__result-title a:hover { |
| 175 | + color: #448daf; |
| 176 | +} |
| 177 | + |
| 178 | +/* Fix to site-search button area smaller on mobile */ |
| 179 | +@media (width <= 768px) { |
| 180 | + body.tg site-search > button { |
| 181 | + width: 100%; |
| 182 | + } |
| 183 | +} |
0 commit comments