mirror of
https://github.com/anomalyco/opencode.git
synced 2026-09-01 15:54:32 +00:00
fix(session-ui): reduce inline code height
This commit is contained in:
parent
01eda4c178
commit
f29bb4078b
2 changed files with 14 additions and 1 deletions
|
|
@ -153,6 +153,19 @@ story("mounts cached completed Markdown with sanitized HTML and decorations", as
|
|||
await expect(markdown).toHaveAttribute("data-markdown-ready", "")
|
||||
})
|
||||
|
||||
story("keeps inline code backgrounds 18px tall", async ({ page }) => {
|
||||
await page.evaluate(async (fixture) => {
|
||||
const { mountMarkdown } = await import(fixture)
|
||||
await mountMarkdown({ text: "`value` and `src/file.ts`" })
|
||||
}, fixture)
|
||||
const code = page.getByTestId("markdown-fixture").locator(":not(pre) > code")
|
||||
await expect(code).toHaveCount(2)
|
||||
await expect(code.nth(1)).toHaveAttribute("data-inline-code-kind", "path")
|
||||
expect(
|
||||
await code.evaluateAll((elements) => elements.map((element) => element.getBoundingClientRect().height)),
|
||||
).toEqual([18, 18])
|
||||
})
|
||||
|
||||
story("shares in-flight Markdown rendering without overwriting a reclaimed cache entry", async ({ page }) => {
|
||||
const result = await page.evaluate(async (fixture) => {
|
||||
const { getCachedMarkdown, renderCachedMarkdown } = await import(fixture)
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@
|
|||
font-feature-settings: var(--font-family-mono--font-feature-settings);
|
||||
color: var(--v2-text-text-base);
|
||||
font-weight: var(--font-weight-medium);
|
||||
padding: 2px 4px;
|
||||
padding: 0 4px;
|
||||
border-radius: 4px;
|
||||
background: color-mix(in oklch, var(--v2-text-text-base) var(--markdown-inline-code-bg-mix), transparent);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue