From 9827d1663c846eb09c724ea5802eedd18e96f542 Mon Sep 17 00:00:00 2001 From: TenzDelek Date: Sat, 16 Nov 2024 20:22:39 +0530 Subject: [PATCH 1/3] fix:underline on icons --- src/css/custom.css | 56 +++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index 5ac58a1faf..dc8cce6dea 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -6,7 +6,7 @@ /* You can override the default Infima variables here. */ -@font-face { + @font-face { font-family: "Inter"; src: url("/fonts/Inter-VariableFont_opsz,wght.ttf"), url("/fonts/Inter-Italic-VariableFont_opsz,wght.ttf"); @@ -104,51 +104,27 @@ a { text-decoration-thickness: var(--pydata-link-underline-thickness); text-underline-offset: var(--pydata-link-underline-offset); } - -a:hover, -/* We need to (re)override some of the infima rules to have proper states on -navbar links, table of contents, and docs sidebar links, respectively */ -a.navbar__link:hover, /* Top bar navigation links */ -a.table-of-contents__link:hover, /*Right sidebar links (table of contents) */ -a[class^="sidebarItemLink"]:hover /* The docs sidebar links do not have its own class */ { +/* Base link styles */ +.navbar__link { + text-decoration: none; +} +.navbar__link:hover { text-decoration: underline; text-decoration-thickness: var(--pydata-link-hover-decoration-thickness); - text-decoration-skip-ink: none; - text-decoration-skip: none; -} -a:active, -a.navbar__link:active, -a.table-of-contents__link:active, -a[class^="sidebarItemLink"]:active { - text-decoration-thickness: var(--pydata-link-decoration-thickness); + text-underline-offset: var(--pydata-link-underline-offset); } -/* In some cases, we override the underlines because there are other elements that -already report the state (e.g. borders, background colors, etc) */ -a[class^="sidebarItemLink"][aria-current="page"], /* No underline if this is the current page */ -a.navbar__link, -.navbar-sidebar__item, -.menu a, -.navbar__items--right a, -.pagination-nav__link, -a.card, /* These cards are used in index-like documentation pages */ -a.card:hover { - text-decoration: none; +/* Remove underlines ONLY from GitHub and Zulip icons */ +.navbar__items--right a.fab.fa-lg.fa-github, +.navbar__items--right a.fa-solid.fa-comments { + text-decoration: none !important; } -/* On these elements, we only rely on background color changes. They are navigation items, -so they are already assumed to be clickable anyway */ -.pagination-nav__link:active, -a.card:active, -a.menu__link:active { - background: var(--ifm-color-primary-lightest); - color: #000; -} -[data-theme="dark"] .pagination-nav__link:active, -[data-theme="dark"] a.card:active, -[data-theme="dark"] a.menu__link:active { - background: var(--ifm-color-primary-darkest); - color: #fff; +.navbar__items--right a.fab.fa-lg.fa-github:hover, +.navbar__items--right a.fa-solid.fa-comments:hover { + text-decoration: none !important; + opacity: 0.7; + transition: opacity 0.2s ease-in-out; } /* Animate the top navbar conda-forge logo a bit */ From 9a3dea3e9bf7098b189cf9f5c5b16e9392a55aef Mon Sep 17 00:00:00 2001 From: TenzDelek Date: Sat, 16 Nov 2024 20:26:38 +0530 Subject: [PATCH 2/3] updates --- src/css/custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/custom.css b/src/css/custom.css index dc8cce6dea..70ce337b2f 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -6,7 +6,7 @@ /* You can override the default Infima variables here. */ - @font-face { +@font-face { font-family: "Inter"; src: url("/fonts/Inter-VariableFont_opsz,wght.ttf"), url("/fonts/Inter-Italic-VariableFont_opsz,wght.ttf"); From 79a653f9c065075afb8e1d68d399b9285284d0ac Mon Sep 17 00:00:00 2001 From: TenzDelek Date: Sat, 16 Nov 2024 21:41:43 +0530 Subject: [PATCH 3/3] mobile view fix --- src/css/custom.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index 70ce337b2f..43d382d595 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -6,7 +6,7 @@ /* You can override the default Infima variables here. */ -@font-face { + @font-face { font-family: "Inter"; src: url("/fonts/Inter-VariableFont_opsz,wght.ttf"), url("/fonts/Inter-Italic-VariableFont_opsz,wght.ttf"); @@ -114,14 +114,14 @@ a { text-underline-offset: var(--pydata-link-underline-offset); } -/* Remove underlines ONLY from GitHub and Zulip icons */ -.navbar__items--right a.fab.fa-lg.fa-github, -.navbar__items--right a.fa-solid.fa-comments { +/* Remove underlines from GitHub and Zulip icons in both desktop and mobile views */ +.navbar__items--right a[class*="fa-"], +.navbar-sidebar__items a[class*="fa-"] { text-decoration: none !important; } -.navbar__items--right a.fab.fa-lg.fa-github:hover, -.navbar__items--right a.fa-solid.fa-comments:hover { +.navbar__items--right a[class*="fa-"]:hover, +.navbar-sidebar__items a[class*="fa-"]:hover { text-decoration: none !important; opacity: 0.7; transition: opacity 0.2s ease-in-out;