docs(docs-infra): Fixes the visibility of the copy link button in API documentation headings

Fixes the visibility of the copy link button in API documentation headings.
The button now appears on hover, improving the user experience.

(cherry picked from commit 15e3407dab)
This commit is contained in:
SkyZeroZx 2025-12-06 18:57:56 -05:00 committed by Alex Rickabaugh
parent 2dd971b73e
commit 49fca78f27
2 changed files with 15 additions and 1 deletions

View file

@ -17,7 +17,7 @@ export function SectionHeading(props: {name: string}) {
return (
<h2 id={id} class={SECTION_HEADING}>
<a href={'#' + id} aria-label={label} tabIndex={-1}>
<a class="docs-anchor" href={'#' + id} aria-label={label} tabIndex={-1}>
{props.name}
</a>
</h2>

View file

@ -73,6 +73,20 @@
}
}
.docs-api {
h1,
h2,
h3,
h4,
h5,
h6 {
// Show copy link button when hovering the heading
&:hover docs-copy-link-button {
opacity: 1;
}
}
}
.docs-reference-members {
box-sizing: border-box;
width: 100%;