mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2026-04-29 15:37:48 +00:00
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>
140 lines
2.6 KiB
SCSS
140 lines
2.6 KiB
SCSS
/* Content text styling (applies mostly to Markdown-generated content)------- */
|
|
|
|
[data-component-name="Markdown/Markdown"] article {
|
|
padding-bottom: 50px;
|
|
|
|
p code,
|
|
table code,
|
|
li > code {
|
|
background-color: $green-1000;
|
|
color: $green-400;
|
|
}
|
|
|
|
a {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 3rem;
|
|
margin-top: 32px;
|
|
line-height: 1.2;
|
|
font-weight: 700;
|
|
|
|
&:first-child {
|
|
margin-top: 0;
|
|
line-height: 1.2;
|
|
}
|
|
}
|
|
|
|
h2, h2.md {
|
|
margin-top: 2.5rem;
|
|
margin-bottom: 1.5rem;
|
|
font-size: 2.5rem;
|
|
font-weight: 600;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
h3, h3.md {
|
|
font-size: 2.125rem;
|
|
margin-top: 2rem;
|
|
margin-bottom: 1rem;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 1.75rem;
|
|
margin-top: 1.5rem;
|
|
margin-bottom: 0.5rem;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
h5 {
|
|
font-size: 1.25rem;
|
|
margin-top: 1.25rem;
|
|
line-height: 1.2;
|
|
font-weight: 700;
|
|
}
|
|
|
|
h6 {
|
|
font-size: 1rem;
|
|
margin-top: 1rem;
|
|
line-height: 1.2;
|
|
font-weight: 700;
|
|
}
|
|
|
|
/* Some list items contain <p> tags, some don't. These styles make sure both
|
|
kinds are spaced consistently. */
|
|
> ul, > ol, .children-display {
|
|
li {
|
|
margin: 6px;
|
|
margin-top: 24px;
|
|
}
|
|
li:first-child {
|
|
margin-top: 16px;
|
|
}
|
|
li p {
|
|
margin: 0;
|
|
}
|
|
}
|
|
[data-component-name="Markdoc/Tabs/Tabs"] li {
|
|
margin: 0;
|
|
}
|
|
|
|
// "Source" links float right
|
|
a[title="Source"],
|
|
a[title="ソース"] {
|
|
float: right;
|
|
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,
|
|
h2.invisible,
|
|
h3.invisible,
|
|
h4.invisible,
|
|
h5.invisible,
|
|
h6.invisible {
|
|
font-size: 0;
|
|
line-height: 0;
|
|
margin: 0;
|
|
|
|
.hover_anchor {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.shield {
|
|
// {% badge ... %} (shields.io) components in md
|
|
display: inline-block !important;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
.blurb a {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
// Hover anchors ---------------
|
|
.hover_anchor {
|
|
visibility: hidden;
|
|
padding-left: 1rem;
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
h1,h2,h3,h4,h5,h6 {
|
|
&:hover .hover_anchor {
|
|
visibility: visible;
|
|
text-decoration: none;
|
|
}
|
|
}
|