Skip to content

Commit 5f8b639

Browse files
authored
Merge pull request #1106 from Irfan762/fix-link-underline
Fix #870: apply underline styling to anchor element
2 parents fdda927 + f585ae2 commit 5f8b639

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/components/Nav/JumpToLinks.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ export const JumpToLinks = ({
3636
{links?.map((link) => (
3737
<li
3838
key={link.label}
39-
class={`${styles.linklabel} ${link.size ?? ""} ${link.current ? "current" : ""}`}
39+
class={`${styles.linklabel} ${link.size ?? ""}`}
4040
>
41-
<a href={link.url}>{link.label}</a>
41+
<a href={link.url} class={link.current ? "current" : ""}>
42+
{link.label}
43+
</a>
4244
</li>
4345
))}
4446
</ul>

src/components/Nav/styles.module.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@
225225
}
226226

227227
.linklabel {
228-
&:global(.current) {
228+
text-decoration: none;
229+
230+
a:global(.current) {
229231
text-decoration-line: underline;
230232
}
231233

0 commit comments

Comments
 (0)