File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed
Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import Translate from "@docusaurus/Translate";
33import { ThemeClassNames } from "@docusaurus/theme-common" ;
44import Link from "@docusaurus/Link" ;
55import type { Props } from "@theme/EditThisPage" ;
6+ import styles from "./styles.module.css" ;
67
78function ExternalIcon ( { className } : { className ?: string } ) {
89 return (
@@ -29,14 +30,17 @@ function ExternalIcon({ className }: { className?: string }) {
2930
3031export default function EditThisPage ( { editUrl } : Props ) : ReactNode {
3132 return (
32- < Link to = { editUrl } className = { ThemeClassNames . common . editThisPage } >
33+ < Link
34+ to = { editUrl }
35+ className = { `${ ThemeClassNames . common . editThisPage } ${ styles . editThisPageLink } ` }
36+ >
3337 < Translate
3438 id = "theme.common.editThisPage"
3539 description = "The link label to view the raw source for the current page"
3640 >
3741 View page as Markdown
3842 </ Translate >
39- < ExternalIcon />
43+ < ExternalIcon className = { styles . externalIcon } />
4044 </ Link >
4145 ) ;
4246}
Original file line number Diff line number Diff line change 1+ .editThisPageLink ,
2+ .editThisPageLink : visited {
3+ color : var (--ifm-font-color-base );
4+ text-decoration : none;
5+ transition : color var (--ifm-transition-fast )
6+ var (--ifm-transition-timing-default );
7+ }
8+
9+ .editThisPageLink : hover ,
10+ .editThisPageLink : focus-visible {
11+ color : var (--ifm-color-primary );
12+ text-decoration : none;
13+ }
14+
15+ [data-theme = "dark" ] .editThisPageLink : hover ,
16+ [data-theme = "dark" ] .editThisPageLink : focus-visible {
17+ color : var (--ifm-color-primary-lighter );
18+ }
19+
20+ .externalIcon {
21+ margin-left : 0.3em ;
22+ vertical-align : text-bottom;
23+ stroke : currentColor;
24+ transition : color var (--ifm-transition-fast )
25+ var (--ifm-transition-timing-default );
26+ }
You can’t perform that action at this time.
0 commit comments