From d58a429859f3f0fd4c16ce6dee30407ce556c3a7 Mon Sep 17 00:00:00 2001 From: Carla Goncalves Date: Wed, 14 Aug 2024 13:25:42 +0100 Subject: [PATCH 1/2] Update link color --- src/css/theming.css | 15 +++++++++++---- src/theme/DocSidebarItem/Link/styles.module.css | 1 - src/theme/MDXComponents.tsx | 14 ++++++++++++++ src/theme/styles.module.scss | 8 +++----- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/css/theming.css b/src/css/theming.css index 2143d7e182..8ab6cca750 100644 --- a/src/css/theming.css +++ b/src/css/theming.css @@ -76,7 +76,8 @@ --header-bg-color: #ffffff; --selection-bgd-color: #0c344b; --white-color: #ffffff; - --link-color: #3182ce; + --ifm-link-color: #3182ce; + --ifm-menu-color-active: #3182ce; --border-color: #e2e8f0; --code-bgd-color: #f6f8fa; --code-inline-bgd-color: #edf2f7; @@ -207,7 +208,7 @@ html[data-theme="dark"] { --header-bg-color: #1a202c; --selection-bgd-color: #0c344b; --white-color: #ffffff; - --link-color: #3182ce; + --ifm-link-color: #43BAEC; --code-bgd-color: #1A202C; --code-inline-bgd-color: #2d3748; --list-bullet-color: #a0aec0; @@ -309,7 +310,8 @@ html[data-theme="dark"] { --header-bg-color: #ffffff; --selection-bgd-color: #0c344b; --white-color: #ffffff; - --link-color: #3182ce; + --ifm-link-color: #3182ce; + --ifm-menu-color-active: #3182ce; --border-color: #e2e8f0; --code-bgd-color: #f6f8fa; --code-inline-bgd-color: #edf2f7; @@ -425,7 +427,8 @@ html[data-theme="dark"] { --header-bg-color: #1a202c; --selection-bgd-color: #0c344b; --white-color: #ffffff; - --link-color: #3182ce; + --ifm-link-color: #43BAEC; + --ifm-menu-color-active: #43BAEC; --ifm-link-hover-color: #5196d7; --code-bgd-color: #1A202C; --code-inline-bgd-color: #2d3748; @@ -476,3 +479,7 @@ html[data-theme="dark"] { --border-color: #2d3748; --white-color: white; } + +html[data-theme="dark"] .external-link { + fill: pink; +} \ No newline at end of file diff --git a/src/theme/DocSidebarItem/Link/styles.module.css b/src/theme/DocSidebarItem/Link/styles.module.css index b710c75f8b..258abc8477 100644 --- a/src/theme/DocSidebarItem/Link/styles.module.css +++ b/src/theme/DocSidebarItem/Link/styles.module.css @@ -16,7 +16,6 @@ .active { font-weight: 700; - color: rgb(49, 130, 206) !important; } [data-theme="light"] .active:hover { diff --git a/src/theme/MDXComponents.tsx b/src/theme/MDXComponents.tsx index 3bc540972e..e11b654870 100644 --- a/src/theme/MDXComponents.tsx +++ b/src/theme/MDXComponents.tsx @@ -139,6 +139,19 @@ const NavigationLinksContainer: React.FC = ({ children return <>{children}; }; +const ExternalIcon = () => + + + const StyledLink: React.FC>> = ({ children, ...props @@ -150,6 +163,7 @@ const StyledLink: React.FC>> = ({ return ( {children} + ); }; diff --git a/src/theme/styles.module.scss b/src/theme/styles.module.scss index 6b6632be15..2a97c1c5fe 100644 --- a/src/theme/styles.module.scss +++ b/src/theme/styles.module.scss @@ -53,9 +53,7 @@ .externalLink { position: relative; - background-position: center right; - background-repeat: no-repeat; - background-size: 0.857em; - padding-right: 1em; - background-image: url("/icons/external-link.svg"); + display: inline-flex; + align-items: center; + gap: 3px; } From 4c57ccd8dc161811b4553cfeb40527dcf35d74c9 Mon Sep 17 00:00:00 2001 From: Carla Goncalves Date: Tue, 20 Aug 2024 10:17:51 +0100 Subject: [PATCH 2/2] Update --link-color to --ifm-link-color --- src/css/admonition.css | 2 +- src/css/custom.css | 2 +- src/pages/index.module.scss | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/css/admonition.css b/src/css/admonition.css index 1415bed0e3..69db16dbb3 100644 --- a/src/css/admonition.css +++ b/src/css/admonition.css @@ -23,7 +23,7 @@ border-left: 10px solid var(--ifm-alert-border-color); } .alert a { - text-decoration-color: var(--link-color); + text-decoration-color: var(--ifm-link-color); } .alert a:hover { color: var(--ifm-link-hover-color) !important; diff --git a/src/css/custom.css b/src/css/custom.css index dc938f5ffa..69bac9cf02 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -256,7 +256,7 @@ pre { } a { - color: var(--link-color); + color: var(--ifm-link-color); } .theme-doc-markdown > *:not(.top-section) a { diff --git a/src/pages/index.module.scss b/src/pages/index.module.scss index 5c400ceb3d..b8b34ddbef 100644 --- a/src/pages/index.module.scss +++ b/src/pages/index.module.scss @@ -315,7 +315,7 @@ a, button { - color: var(--link-color); + color: var(--ifm-link-color); } }