fix(ui): give markdown list items more breathing room (#111693)

This commit is contained in:
Peter Steinberger
2026-07-20 00:15:04 -07:00
committed by GitHub
parent f5940ee92d
commit 3e14caa2bd
2 changed files with 13 additions and 3 deletions
+12 -2
View File
@@ -73,18 +73,27 @@ describeControlUiE2e("Control UI route CSS mocked Gateway E2E", () => {
const cronStyles = await page.evaluate(() => {
const probe = document.createElement("div");
probe.innerHTML = `
<div class="chat-text"><ul><li>Item</li></ul><pre><code>code</code></pre></div>
<div class="chat-text"><ul><li>First</li><li>Second</li></ul><pre><code>code</code></pre></div>
<a class="session-link">session</a>
`;
document.body.append(probe);
const list = probe.querySelector("ul");
const secondListItem = probe.querySelector("li + li");
const pre = probe.querySelector("pre");
const link = probe.querySelector(".session-link");
if (!(list instanceof HTMLElement) || !(pre instanceof HTMLElement) || !link) {
if (
!(list instanceof HTMLElement) ||
!(secondListItem instanceof HTMLElement) ||
!(pre instanceof HTMLElement) ||
!link
) {
throw new Error("Cron style probe did not render");
}
const listItemStyle = getComputedStyle(secondListItem);
const result = {
listPadding: Number.parseFloat(getComputedStyle(list).paddingLeft),
listItemGap: Number.parseFloat(listItemStyle.marginTop),
listItemFontSize: Number.parseFloat(listItemStyle.fontSize),
preBorderStyle: getComputedStyle(pre).borderTopStyle,
preOverflow: getComputedStyle(pre).overflowX,
sessionFontWeight: getComputedStyle(link).fontWeight,
@@ -94,6 +103,7 @@ describeControlUiE2e("Control UI route CSS mocked Gateway E2E", () => {
return result;
});
expect(cronStyles.listPadding).toBeGreaterThan(0);
expect(cronStyles.listItemGap / cronStyles.listItemFontSize).toBeCloseTo(0.4, 2);
expect(cronStyles.preBorderStyle).toBe("solid");
expect(cronStyles.preOverflow).toBe("auto");
expect(cronStyles.sessionFontWeight).toBe("500");
+1 -1
View File
@@ -60,7 +60,7 @@
}
.chat-text :where(li + li) {
margin-top: 0.25em;
margin-top: 0.4em;
}
/* Hide default marker only for unordered task lists; ordered lists keep numbers */