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
6 changes: 6 additions & 0 deletions packages/docs-theme/scripts/brand.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ test("an API page's endpoint route wraps instead of scrolling", () => {
assert.equal(declared["white-space"], "normal");
assert.equal(declared["overflow-wrap"], "anywhere");
});

test("an API page's inline code wraps inside its container and keeps a full border on every line", () => {
const declared = declarationsFor(".coder-api-page :not(pre) > code");
assert.equal(declared["overflow-wrap"], "anywhere");
assert.equal(declared["box-decoration-break"], "clone");
});
6 changes: 6 additions & 0 deletions packages/docs-theme/src/brand.css
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,12 @@ figure.shiki:not(.not-fumadocs-codeblock *) pre {
overflow-wrap: anywhere;
}

/* Long values wrap inside their cell, and each wrapped line keeps its own padding and border. */
.coder-api-page :not(pre) > code {
overflow-wrap: anywhere;
box-decoration-break: clone;
}

/* fumadocs-openapi's method badges (on API pages, the landing cards, the sidebar and the page footer) and links are -600/-400 shades that fall short of 4.5:1 (7:1 for More contrast). */
:root:not(.dark)
:is(.coder-api-page, .coder-api-cards, #nd-sidebar, #nd-sidebar-mobile, #nd-page > footer) {
Expand Down
Loading