Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/docs/overlay.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { describe, expect, it } from "vitest";
import { OVERLAY_SCRIPT } from "./overlay";

describe("OVERLAY_SCRIPT", () => {
it("keeps wide tables within their own horizontal scroll area", () => {
expect(OVERLAY_SCRIPT).toContain(
"table{display:block;max-width:100%;overflow-x:auto}"
);
});
});
3 changes: 2 additions & 1 deletion lib/docs/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ export const OVERLAY_SCRIPT = String.raw`
// darkest (3+). .jh-focus intensifies the focused anchor's segments; .jh-dim
// fades non-focused overlapping highlights when a focus is active.
st.textContent =
"span[data-jh-seg]{cursor:pointer;transition:background .12s,opacity .12s,box-shadow .12s}"
"table{display:block;max-width:100%;overflow-x:auto}"
+ "span[data-jh-seg]{cursor:pointer;transition:background .12s,opacity .12s,box-shadow .12s}"
+ "span[data-jh-seg].d1{background:#fff3bf;border-bottom:1px solid #f1d96b}"
+ "span[data-jh-seg].d2{background:#ffe08a;border-bottom:1px solid #e8c44e}"
+ "span[data-jh-seg].d3{background:#ffc94d;border-bottom:1px solid #e0a92e}"
Expand Down
Loading