|
38 | 38 | --docs-accent-tint-line: color-mix(in srgb, var(--color-accent) 10%, transparent); |
39 | 39 | } |
40 | 40 |
|
41 | | -/* Shiki code blocks — tokyo-night theme */ |
42 | | -.shiki { |
43 | | - padding: 1.5rem; |
44 | | - background: var(--docs-code-bg) !important; |
45 | | - overflow-x: auto; |
46 | | -} |
47 | | -.shiki code { |
48 | | - font-family: var(--font-mono), monospace; |
49 | | - font-size: 0.75rem; |
50 | | - line-height: 1.7; |
51 | | -} |
| 41 | +/* NOTE: the old `.shiki` rules were deleted here — rehype-pretty-code runs |
| 42 | + * with keepBackground:true, which writes the theme background INLINE on the |
| 43 | + * <pre> and never emits a .shiki class. Zero elements matched, on docs and |
| 44 | + * blog (findings §9). If keepBackground is ever turned off, style the code |
| 45 | + * background via [data-rehype-pretty-code-figure] pre, not a .shiki rule. */ |
| 46 | + |
52 | 47 |
|
53 | 48 | /* rehype-pretty-code — docs code blocks */ |
54 | 49 | .docs-prose [data-rehype-pretty-code-figure] { |
|
80 | 75 | padding: 0 0.25rem; |
81 | 76 | } |
82 | 77 |
|
83 | | -.docs-prose [data-rehype-pretty-code-figure] [data-rehype-pretty-code-title] { |
84 | | - font-family: var(--font-mono), monospace; |
85 | | - font-size: 0.7rem; |
86 | | - color: var(--docs-code-title-fg); |
87 | | - padding: 0.5rem 1.5rem; |
88 | | - background: var(--docs-code-bg); |
89 | | - border-bottom: 1px solid var(--docs-code-title-rule); |
90 | | - border-radius: 0.75rem 0.75rem 0 0; |
91 | | -} |
| 78 | +/* NOTE: the [data-rehype-pretty-code-title] rules were deleted — no code |
| 79 | + * fence in the repo uses the `title=` meta, so the element is never generated |
| 80 | + * (findings §9). Re-add title styling if a fence ever gains one; the |
| 81 | + * foreground for a dark title bar lives with the --docs-code-* constants. */ |
92 | 82 |
|
93 | | -.docs-prose [data-rehype-pretty-code-figure]:has([data-rehype-pretty-code-title]) pre { |
94 | | - border-radius: 0 0 0.75rem 0.75rem; |
95 | | -} |
96 | 83 |
|
97 | 84 | .docs-prose :not(pre) > code { |
| 85 | + /* .docs-prose sets word-break:break-word, which split tokens like |
| 86 | + * @threadplane/langgraph into two separately-backgrounded pills mid-token. |
| 87 | + * Prefer moving the whole chip to the next line; break inside only when a |
| 88 | + * single token alone exceeds the line (findings §4). break-word, NOT |
| 89 | + * anywhere: `anywhere` also shrinks min-content to one character, which let |
| 90 | + * table columns squeeze below the chip width and wrap `agent` as agen/t. */ |
| 91 | + word-break: normal; |
| 92 | + overflow-wrap: break-word; |
98 | 93 | font-family: var(--font-mono), monospace; |
99 | 94 | font-size: 0.85em; |
100 | 95 | background: var(--color-accent-surface); |
|
176 | 171 | .docs-prose > p:has(> .docs-diagram) { overflow-x: auto; } |
177 | 172 | .docs-prose > p > img.docs-diagram { max-width: none; } |
178 | 173 |
|
179 | | -.docs-table-scroll { max-width: 100%; overflow-x: auto; margin: 1.5rem 0; } |
| 174 | +.docs-table-scroll { |
| 175 | + max-width: 100%; |
| 176 | + overflow-x: auto; |
| 177 | + margin: 1.5rem 0; |
| 178 | + /* Edge fades signal that the table scrolls; background-attachment:local |
| 179 | + * pins the covers to the content so they vanish at the ends. */ |
| 180 | + background: |
| 181 | + linear-gradient(to right, var(--color-surface), var(--color-surface)) left / 24px 100%, |
| 182 | + linear-gradient(to right, var(--color-surface), var(--color-surface)) right / 24px 100%, |
| 183 | + linear-gradient(to right, rgba(0, 0, 0, 0.08), transparent) left / 16px 100%, |
| 184 | + linear-gradient(to left, rgba(0, 0, 0, 0.08), transparent) right / 16px 100%; |
| 185 | + background-repeat: no-repeat; |
| 186 | + background-attachment: local, local, scroll, scroll; |
| 187 | +} |
| 188 | +.docs-table-scroll:focus-visible { |
| 189 | + outline: none; |
| 190 | + box-shadow: var(--shadow-focus); |
| 191 | + border-radius: var(--radius-sm); |
| 192 | +} |
| 193 | +/* width:100% alone meant the table always fit its container, so the scroller |
| 194 | + * had nothing to scroll — at 375px the props table crushed `agent` into a |
| 195 | + * 49px column across three lines (findings §4). A floor makes narrow |
| 196 | + * viewports scroll instead of crush; wide viewports are unaffected. */ |
| 197 | +.docs-table-scroll table { min-width: 560px; } |
180 | 198 | .docs-prose table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin: 0; } |
181 | 199 | .docs-prose th { text-align: left; padding: 0.5rem 0.75rem; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; color: var(--color-text-muted); border-bottom: 1px solid var(--color-accent-border); } |
182 | 200 | .docs-prose td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--docs-accent-tint-soft); color: var(--color-text-secondary); } |
|
455 | 473 | background: var(--color-border); |
456 | 474 | margin-top: 4px; |
457 | 475 | } |
| 476 | +/* The connector is per-step, so the last step trailed a dangling line into |
| 477 | + * the whitespace below (findings §7). */ |
| 478 | +.mdx-step:last-child .mdx-step-connector { |
| 479 | + display: none; |
| 480 | +} |
458 | 481 | .mdx-step-content { |
459 | 482 | flex: 1; |
460 | 483 | /* flex:1 leaves min-width:auto; the item refuses to shrink below its |
|
934 | 957 | margin: 0; |
935 | 958 | display: flex; |
936 | 959 | flex-wrap: wrap; |
937 | | -} |
938 | | -.docs-crumb-link { |
| 960 | + align-items: center; |
| 961 | + row-gap: 4px; |
| 962 | + /* Typography on the LIST, not the links: the separators are siblings of the |
| 963 | + * links inside each li, and when only the links carried 13px the first two |
| 964 | + * separators inherited body's 16px/24px and floated 3px high (findings §3). */ |
939 | 965 | font-family: Inter, system-ui, sans-serif; |
940 | 966 | font-size: 13px; |
941 | 967 | line-height: 1.5; |
| 968 | +} |
| 969 | +.docs-crumb-link { |
942 | 970 | color: var(--color-text-muted); |
943 | 971 | text-decoration: none; |
944 | 972 | } |
|
947 | 975 | color: var(--color-text-muted); |
948 | 976 | } |
949 | 977 | .docs-crumb-current { |
950 | | - font-family: Inter, system-ui, sans-serif; |
951 | | - font-size: 13px; |
952 | | - line-height: 1.5; |
953 | 978 | text-decoration: none; |
954 | 979 | color: var(--color-text-primary); |
955 | 980 | font-weight: 600; |
|
0 commit comments