Let mail wider than the pane scroll sideways (ihasmail #31)

(cherry picked from commit 14680d0e1b2cc966aa840a45e73b238322ed5e17)
This commit is contained in:
jcoffey-dev authored and John Coffey committed 2026-10-05 10:33:41 -07:00
1 parent 7b9da44116
commit cfb28ada45
2 files changed
+17 -1

No files matched your search

+13
View File
@@ -387,3 +387,16 @@ describe("the containment that mail CSS cannot override", () => {
expect(rule).toMatch(/contain\s*:\s*layout/);
});
});
describe("mail wider than the reading pane", () => {
/*
* The root keeps `contain: content`, which clips what overflows, so without
* a scroll the right side of a min-width table was simply gone, worst on a
* phone (Gitea issue #24). jsdom does no layout, so this pins the rule.
*/
it("scrolls sideways instead of being cut off", () => {
const root = EMAIL_BASE_CSS.match(/\.ihm-email-root \{([^}]*)\}/)?.[1] ?? "";
expect(root).toMatch(/contain:\s*content/);
expect(root).toMatch(/overflow-x:\s*auto/);
});
});