mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-21 10:37:51 +02:00
fix(v2): add shadow to skip link on hover only (#5050)
This commit is contained in:
parent
99270dbab2
commit
aa79387e12
2 changed files with 2 additions and 5 deletions
|
@ -6,7 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, {useRef} from 'react';
|
import React, {useRef} from 'react';
|
||||||
import clsx from 'clsx';
|
|
||||||
import Translate from '@docusaurus/Translate';
|
import Translate from '@docusaurus/Translate';
|
||||||
import {useLocationChange} from '@docusaurus/theme-common';
|
import {useLocationChange} from '@docusaurus/theme-common';
|
||||||
|
|
||||||
|
@ -40,10 +39,7 @@ function SkipToContent(): JSX.Element {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={containerRef}>
|
<div ref={containerRef}>
|
||||||
<a
|
<a href="#main" className={styles.skipToContent} onClick={handleSkip}>
|
||||||
href="#main"
|
|
||||||
className={clsx(styles.skipToContent, 'shadow--md')}
|
|
||||||
onClick={handleSkip}>
|
|
||||||
<Translate
|
<Translate
|
||||||
id="theme.common.skipToMainContent"
|
id="theme.common.skipToMainContent"
|
||||||
description="The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation">
|
description="The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation">
|
||||||
|
|
|
@ -10,4 +10,5 @@
|
||||||
|
|
||||||
.skipToContent:focus {
|
.skipToContent:focus {
|
||||||
left: 1rem;
|
left: 1rem;
|
||||||
|
box-shadow: var(--ifm-global-shadow-md);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue