mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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:
parent
2dd971b73e
commit
49fca78f27
2 changed files with 15 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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%;
|
||||
|
|
|
|||
Loading…
Reference in a new issue