From 49fca78f2754359501f84a0fa97dcf44d5fa9ec3 Mon Sep 17 00:00:00 2001 From: SkyZeroZx <73321943+SkyZeroZx@users.noreply.github.com> Date: Sat, 6 Dec 2025 18:57:56 -0500 Subject: [PATCH] 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 15e3407dabf1c77835f976929d8efd6c2a475e0a) --- .../rendering/templates/section-heading.tsx | 2 +- adev/shared-docs/styles/_reference.scss | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/adev/shared-docs/pipeline/api-gen/rendering/templates/section-heading.tsx b/adev/shared-docs/pipeline/api-gen/rendering/templates/section-heading.tsx index 2963acb1833..7544b3cb676 100644 --- a/adev/shared-docs/pipeline/api-gen/rendering/templates/section-heading.tsx +++ b/adev/shared-docs/pipeline/api-gen/rendering/templates/section-heading.tsx @@ -17,7 +17,7 @@ export function SectionHeading(props: {name: string}) { return (

- + {props.name}

diff --git a/adev/shared-docs/styles/_reference.scss b/adev/shared-docs/styles/_reference.scss index b4d9d4d3a89..1d3f7381966 100644 --- a/adev/shared-docs/styles/_reference.scss +++ b/adev/shared-docs/styles/_reference.scss @@ -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%;