Skip to content

Commit eabb093

Browse files
committed
fix style
Signed-off-by: Matthias Wippich <mfwippich@gmail.com>
1 parent dd6f687 commit eabb093

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/codeblocks.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ codeblock,
2121
background: var(--codeblocks-panel);
2222
color: var(--codeblocks-foreground);
2323
font-family: system-ui, sans-serif;
24+
font-size: 14px;
25+
line-height: normal;
2426
}
2527

2628
.codeblocks-root[data-theme="light"] {

tests/runtime.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,16 @@ test("overflow widgets are not clipped by the code block", async ({ page }) => {
227227
)).toBe("visible");
228228
});
229229

230+
test("host typography does not leak into Monaco UI widgets", async ({ page }) => {
231+
await page.goto("http://localhost:4173/", { waitUntil: "domcontentloaded" });
232+
await expect(page.locator(".monaco-editor")).toBeVisible({ timeout: 60_000 });
233+
await page.locator("body").evaluate((element) => {
234+
element.style.font = "32px/2 serif";
235+
});
236+
await expect(page.locator("codeblock")).toHaveCSS("font-size", "14px");
237+
await expect(page.locator(".overflowingContentWidgets")).toHaveCSS("font-size", "14px");
238+
});
239+
230240
test("tabs preserve independent sources and arbitrary container sizes relayout", async ({ page }) => {
231241
await page.goto("http://localhost:4173/", { waitUntil: "domcontentloaded" });
232242
await expect(page.locator("codeblock")).toHaveClass(/codeblocks-root/);

0 commit comments

Comments
 (0)