Compare commits

..

1 Commits

Author SHA1 Message Date
rachelflynn
f0d0aaad40 fix: restore [Source] link positioning after Redocly 0.131.0 upgrade
Redocly 0.131.0 changed CommonMark parsing so [[Source]] on its own line
after a heading is emitted as a separate <p> instead of inline inside <h1>.
That <p> collapsed to zero height (floated child), causing the [Source] link
to bleed into the description paragraph below.

Fix via overflow:hidden on the <p> containing the [Source] link, which
creates a block formatting context and makes the paragraph contain its
floated child properly. No markdown files need to change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 14:24:22 -04:00
2 changed files with 10 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -87,6 +87,15 @@
padding-left: 20px;
}
// [[Source]] renders as its own <p> after the heading (Redocly 0.131.0+).
// overflow: hidden creates a block formatting context so the <p> contains
// its floated child instead of collapsing to zero height and bleeding into
// the next paragraph.
p:has(> a[title="Source"]),
p:has(> a[title="ソース"]) {
overflow: hidden;
}
// Make "invisible" headers take up no space either, so we can use them
// to add additional anchors (e.g. for translated pages)
h1.invisible,