1
0
mirror of synced 2026-01-07 09:01:31 -05:00

Merge pull request #25474 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2023-05-09 13:38:15 -04:00
committed by GitHub
3 changed files with 10 additions and 7 deletions

View File

@@ -15,10 +15,7 @@ export function HeadingLink({ children, as: Component, slug, className }: PropsT
<Component id={slug} className={className} tabIndex={-1}>
<a className="heading-link" href={`#${slug}`}>
{children}
<span aria-hidden="true" className="heading-link-symbol">
{' '}
#
</span>
<span aria-hidden="true" className="heading-link-symbol" />
</a>
</Component>
)

View File

@@ -15,7 +15,7 @@ export default function headingLinks() {
node.children = [
h('a', { class: 'heading-link', href: `#${id}` }, [
...text,
h('span', { class: 'heading-link-symbol', ariaHidden: 'true' }, [' #']),
h('span', { class: 'heading-link-symbol', ariaHidden: 'true' }),
]),
]
})

View File

@@ -3,6 +3,12 @@
}
.heading-link-symbol {
font-weight: lighter;
color: var(--color-fg-subtle);
display: inline-block;
margin-left: 0.5rem;
width: 16px;
height: 16px;
// https://primer.style/design/foundations/icons/link-16
mask: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>');
mask-size: cover;
background-color: var(--color-fg-subtle);
}