|
180 | 180 | <code><span class="method">GET</span> {endpoint}</code> |
181 | 181 | {/snippet} |
182 | 182 |
|
183 | | - <!-- The copy icon, or a tick once it's copied --> |
| 183 | + <!-- The copy icon, or a tick once it's copied, each drawing centred in its box --> |
184 | 184 | {#snippet icons()} |
185 | | - <svg class="icon" class:gone={copied} viewBox="0 0 16 16" aria-hidden="true"> |
| 185 | + <svg class="icon" class:gone={copied} viewBox="0 -0.5 16 16" aria-hidden="true"> |
186 | 186 | <rect x="5.5" y="5.5" width="8" height="8" rx="1.5" /> |
187 | 187 | <path |
188 | 188 | d="M10.5 3.5v-.5a1.5 1.5 0 0 0-1.5-1.5H4A1.5 1.5 0 0 0 2.5 3v5A1.5 1.5 0 0 0 4 9.5h.5" |
189 | 189 | /> |
190 | 190 | </svg> |
191 | | - <svg class="icon" class:gone={!copied} viewBox="0 0 16 16" aria-hidden="true"> |
| 191 | + <svg class="icon" class:gone={!copied} viewBox="0 0.375 16 16" aria-hidden="true"> |
192 | 192 | <path d="m3 8.5 3.25 3.25L13 5" /> |
193 | 193 | </svg> |
194 | 194 | {/snippet} |
|
283 | 283 |
|
284 | 284 | .command { |
285 | 285 | display: flex; |
286 | | - align-items: center; |
| 286 | + align-items: flex-start; |
287 | 287 | gap: 0.625rem; |
288 | 288 | font-size: clamp(1.5rem, 2.3vw, 2rem); |
289 | 289 | line-height: 1.2; |
|
309 | 309 | position: absolute; |
310 | 310 | } |
311 | 311 |
|
312 | | - /* Trimmed to the height of its capitals, so the icon beside it centres on the letters rather |
313 | | - than on a line box with room for descenders */ |
314 | 312 | code { |
315 | 313 | color: var(--ink); |
316 | 314 | font: inherit; |
317 | | - text-box: trim-both cap alphabetic; |
318 | 315 | } |
319 | 316 |
|
320 | 317 | @media (max-width: 900px) { |
|
352 | 349 | place-items: center; |
353 | 350 | width: 1.75rem; |
354 | 351 | height: 1.75rem; |
| 352 | + /* Centred on the capitals by hand, from IBM Plex Mono's metrics: an ascent of 1.02em |
| 353 | + and a descent of 0.27em in a 1.2em line put the baseline 0.975em down, and its |
| 354 | + capitals, 0.698em tall, are centred 0.626em down */ |
| 355 | + margin-top: calc(0.626em - 0.875rem); |
355 | 356 | border-radius: 0.375rem; |
356 | 357 | background: none; |
357 | 358 | color: var(--ink-soft); |
|
0 commit comments