| 1 | /* ------------------------------------------------------------------ */ |
| 2 | /* Documentation portal */ |
| 3 | /* ------------------------------------------------------------------ */ |
| 4 | |
| 5 | .docs-portal { |
| 6 | background: var(--paper); |
| 7 | } |
| 8 | |
| 9 | .docs-portal .hero { |
| 10 | padding-block: 0.75rem; |
| 11 | } |
| 12 | |
| 13 | .docs-portal-band { |
| 14 | display: flex; |
| 15 | flex-wrap: wrap; |
| 16 | align-items: baseline; |
| 17 | gap: 1rem; |
| 18 | } |
| 19 | |
| 20 | .docs-portal-band .portal-mark, |
| 21 | .docs-portal-band .release-truth { |
| 22 | margin: 0; |
| 23 | } |
| 24 | |
| 25 | .docs-hub-lede { |
| 26 | margin: 0.8rem 0 1.5rem; |
| 27 | color: var(--ink-soft); |
| 28 | } |
| 29 | |
| 30 | .docs-shell { |
| 31 | display: grid; |
| 32 | grid-template-columns: minmax(13rem, 0.28fr) minmax(0, 0.72fr); |
| 33 | grid-template-areas: "sidebar content"; |
| 34 | gap: clamp(2rem, 5vw, 4.5rem); |
| 35 | align-items: start; |
| 36 | padding-block: clamp(2.25rem, 5vw, 4rem); |
| 37 | } |
| 38 | |
| 39 | .docs-sidebar { |
| 40 | grid-area: sidebar; |
| 41 | border-top: 1px solid var(--hairline); |
| 42 | } |
| 43 | |
| 44 | .docs-sidebar-heading { |
| 45 | padding-block: 0.9rem; |
| 46 | border-bottom: 1px solid var(--hairline); |
| 47 | color: var(--ink); |
| 48 | font-size: 0.82rem; |
| 49 | font-weight: 600; |
| 50 | } |
| 51 | |
| 52 | .docs-sidebar-heading a { |
| 53 | display: flex; |
| 54 | align-items: center; |
| 55 | justify-content: space-between; |
| 56 | gap: 1rem; |
| 57 | } |
| 58 | |
| 59 | .docs-sidebar-heading a > span:last-child { |
| 60 | color: var(--ink-mute); |
| 61 | font-size: 0.75rem; |
| 62 | } |
| 63 | |
| 64 | .docs-sidebar-group { |
| 65 | padding-block: 0.9rem; |
| 66 | border-bottom: 1px solid var(--hairline); |
| 67 | } |
| 68 | |
| 69 | .docs-sidebar-category { |
| 70 | margin-bottom: 0.35rem; |
| 71 | color: var(--ink-mute); |
| 72 | font-size: 0.75rem; |
| 73 | font-weight: 600; |
| 74 | } |
| 75 | |
| 76 | .docs-sidebar-link { |
| 77 | display: flex; |
| 78 | align-items: center; |
| 79 | justify-content: space-between; |
| 80 | gap: 0.8rem; |
| 81 | padding-block: 0.32rem; |
| 82 | color: var(--ink-soft); |
| 83 | font-size: 0.8rem; |
| 84 | line-height: 1.4; |
| 85 | transition: color var(--dur-state) var(--ease-spring); |
| 86 | } |
| 87 | |
| 88 | .docs-sidebar-link:hover, |
| 89 | .docs-sidebar-link-current { |
| 90 | color: var(--docs-accent); |
| 91 | } |
| 92 | |
| 93 | .docs-sidebar-link-current { |
| 94 | font-weight: 600; |
| 95 | } |
| 96 | |
| 97 | .docs-sidebar-link > span:last-child:not(:first-child) { |
| 98 | color: var(--ink-mute); |
| 99 | font-size: 0.75rem; |
| 100 | } |
| 101 | |
| 102 | .docs-content { |
| 103 | grid-area: content; |
| 104 | width: 100%; |
| 105 | max-width: 52rem; |
| 106 | } |
| 107 | |
| 108 | .docs-content p { |
| 109 | max-width: 70ch; |
| 110 | } |
| 111 | |
| 112 | .docs-breadcrumb { |
| 113 | margin-bottom: 1.15rem; |
| 114 | color: var(--ink-mute); |
| 115 | font-family: var(--font-mono); |
| 116 | font-size: 0.75rem; |
| 117 | } |
| 118 | |
| 119 | .docs-breadcrumb ol { |
| 120 | display: flex; |
| 121 | flex-wrap: wrap; |
| 122 | align-items: baseline; |
| 123 | margin: 0; |
| 124 | padding: 0; |
| 125 | list-style: none; |
| 126 | } |
| 127 | |
| 128 | .docs-breadcrumb li:not(:last-child)::after { |
| 129 | content: "/"; |
| 130 | margin-inline: 0.5em; |
| 131 | color: var(--ink-mute); |
| 132 | } |
| 133 | |
| 134 | .docs-breadcrumb a { |
| 135 | color: var(--indigo); |
| 136 | } |
| 137 | |
| 138 | .docs-breadcrumb a:hover { |
| 139 | text-decoration: underline; |
| 140 | } |
| 141 | |
| 142 | .docs-breadcrumb [aria-current="page"] { |
| 143 | color: var(--ink); |
| 144 | } |
| 145 | |
| 146 | .docs-search-block { |
| 147 | margin-bottom: 2.25rem; |
| 148 | } |
| 149 | |
| 150 | .docs-search-label { |
| 151 | display: block; |
| 152 | margin-bottom: 0.55rem; |
| 153 | color: var(--ink-mute); |
| 154 | font-size: 0.75rem; |
| 155 | font-weight: 600; |
| 156 | } |
| 157 | |
| 158 | .docs-search-input { |
| 159 | min-height: 3rem; |
| 160 | padding-right: 3rem; |
| 161 | border-color: var(--paper-line-soft); |
| 162 | border-radius: var(--radius-control); |
| 163 | background: color-mix(in srgb, var(--paper) 88%, transparent); |
| 164 | } |
| 165 | |
| 166 | .docs-search-clear { |
| 167 | position: absolute; |
| 168 | right: 0.9rem; |
| 169 | top: 50%; |
| 170 | translate: 0 -50%; |
| 171 | color: var(--ink-mute); |
| 172 | font-size: 0.82rem; |
| 173 | } |
| 174 | |
| 175 | .docs-search-clear:hover { |
| 176 | color: var(--ink); |
| 177 | } |
| 178 | |
| 179 | .docs-search-count { |
| 180 | margin-top: 0.55rem; |
| 181 | color: var(--ink-mute); |
| 182 | font-size: 0.75rem; |
| 183 | } |
| 184 | |
| 185 | .docs-result-groups { |
| 186 | display: grid; |
| 187 | gap: 2.5rem; |
| 188 | } |
| 189 | |
| 190 | .docs-result-heading { |
| 191 | display: flex; |
| 192 | align-items: baseline; |
| 193 | justify-content: space-between; |
| 194 | gap: 1rem; |
| 195 | margin-bottom: 0.55rem; |
| 196 | } |
| 197 | |
| 198 | .docs-result-heading h2 { |
| 199 | font-size: 1.28rem; |
| 200 | letter-spacing: -0.02em; |
| 201 | } |
| 202 | |
| 203 | .docs-result-heading > span { |
| 204 | color: var(--ink-mute); |
| 205 | font-size: 0.75rem; |
| 206 | } |
| 207 | |
| 208 | .docs-topic-list { |
| 209 | border-top: 1px solid var(--hairline); |
| 210 | } |
| 211 | |
| 212 | .docs-topic-row { |
| 213 | display: grid; |
| 214 | grid-template-columns: minmax(0, 1fr) auto; |
| 215 | gap: 1.25rem; |
| 216 | align-items: center; |
| 217 | padding-block: 1rem; |
| 218 | border-bottom: 1px solid var(--hairline); |
| 219 | transition: background-color var(--dur-state) var(--ease-spring), color var(--dur-state) var(--ease-spring); |
| 220 | } |
| 221 | |
| 222 | .docs-topic-row:hover { |
| 223 | color: var(--docs-accent); |
| 224 | background: var(--hover); |
| 225 | } |
| 226 | |
| 227 | .docs-topic-title { |
| 228 | display: flex; |
| 229 | flex-wrap: wrap; |
| 230 | gap: 0.5rem; |
| 231 | align-items: baseline; |
| 232 | color: var(--ink); |
| 233 | font-size: 0.9rem; |
| 234 | font-weight: 600; |
| 235 | } |
| 236 | |
| 237 | .docs-topic-title > span:last-child { |
| 238 | color: var(--ink-mute); |
| 239 | font-size: 0.75rem; |
| 240 | font-weight: 500; |
| 241 | } |
| 242 | |
| 243 | .docs-topic-main p { |
| 244 | margin-top: 0.28rem; |
| 245 | color: var(--ink-soft); |
| 246 | font-size: 0.78rem; |
| 247 | line-height: 1.55; |
| 248 | } |
| 249 | |
| 250 | .docs-topic-arrow { |
| 251 | color: var(--ink-mute); |
| 252 | font-size: 0.78rem; |
| 253 | } |
| 254 | |
| 255 | /* A topic row and, beside it, the files it is written from. */ |
| 256 | .docs-topic-item { |
| 257 | display: grid; |
| 258 | grid-template-columns: minmax(0, 1fr) auto; |
| 259 | align-items: start; |
| 260 | column-gap: 1rem; |
| 261 | border-bottom: 1px solid var(--hairline); |
| 262 | } |
| 263 | .docs-topic-item > .docs-topic-row { border-bottom: 0; } |
| 264 | .docs-topic-details { padding-block: 1rem; } |
| 265 | .docs-topic-details > summary { |
| 266 | color: var(--ink-mute); |
| 267 | font-size: 0.75rem; |
| 268 | cursor: pointer; |
| 269 | border-radius: var(--radius-control); |
| 270 | } |
| 271 | .docs-topic-details > summary:hover { color: var(--ink); } |
| 272 | .docs-topic-details { max-width: 15rem; text-align: end; } |
| 273 | .docs-topic-source { |
| 274 | margin-top: 0.4rem; |
| 275 | color: var(--ink-mute); |
| 276 | font-size: 0.75rem; |
| 277 | line-height: 1.6; |
| 278 | overflow-wrap: anywhere; |
| 279 | } |
| 280 | .docs-topic-source code { font-family: var(--font-mono); } |
| 281 | |
| 282 | .docs-source-note { |
| 283 | margin-top: 2.5rem; |
| 284 | padding-top: 1.25rem; |
| 285 | border-top: 1px solid var(--hairline); |
| 286 | } |
| 287 | |
| 288 | .docs-source-note p { |
| 289 | max-width: 70ch; |
| 290 | color: var(--ink-mute); |
| 291 | font-size: 0.75rem; |
| 292 | line-height: 1.6; |
| 293 | } |
| 294 | |
| 295 | @media (max-width: 900px) { |
| 296 | .docs-shell { |
| 297 | grid-template-columns: 1fr; |
| 298 | grid-template-areas: |
| 299 | "content" |
| 300 | "sidebar"; |
| 301 | } |
| 302 | |
| 303 | /* The one docs nav stays reachable below the article: the groups reflow |
| 304 | into columns so 23 topics read as an index, not a scroll of links. */ |
| 305 | .docs-sidebar nav { |
| 306 | display: grid; |
| 307 | grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); |
| 308 | column-gap: 2rem; |
| 309 | } |
| 310 | |
| 311 | .docs-sidebar-group:last-child { border-bottom: 0; } |
| 312 | } |
| 313 | |
| 314 | @media (max-width: 640px) { |
| 315 | .docs-topic-row { gap: 0.6rem 1rem; } |
| 316 | } |
| 317 | |
| 318 | /* ------------------------------------------------------------------ */ |
| 319 | /* Docs theme */ |
| 320 | /* */ |
| 321 | /* The docs sheet follows the site-wide theme like every other page: */ |
| 322 | /* the OS appearance by default, or the choice pinned by the theme */ |
| 323 | /* toggle. The sheet inks (`--docs-*`) are declared beside :root in */ |
| 324 | /* both schemes, so nothing here is scoped to a dark region. */ |
| 325 | /* ------------------------------------------------------------------ */ |
| 326 | |
| 327 | .docs-theme { |
| 328 | background: var(--paper); |
| 329 | color: var(--ink); |
| 330 | } |
| 331 | |
| 332 | .docs-theme .portal-button-secondary { |
| 333 | border-color: var(--docs-button-border); |
| 334 | background: var(--docs-button-bg); |
| 335 | color: var(--docs-button-text); |
| 336 | } |
| 337 | |
| 338 | .docs-theme .portal-button-secondary:hover { |
| 339 | background: var(--hover); |
| 340 | } |
| 341 | |
| 342 |