Skip to content

Commit

Permalink
fix: #333 - gray underline for default link on visited state + force …
Browse files Browse the repository at this point in the history
…highcontrast if highcontrast and articles props are both true
  • Loading branch information
mattgoud committed May 30, 2024
1 parent bcdbd24 commit 07e05fc
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions packages/theme/src/puik-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@
@apply cursor-pointer
relative
text-primary

underline
decoration-auto
underline-offset-[2px]
decoration-primary-500

transition-all
duration-150;

&:hover,
&:active,
&:visited {
@apply decoration-primary underline-offset-[5px];
@apply underline-offset-[5px];
}

&:hover,
&:visited:hover {
@apply decoration-primary;
}

&:focus-visible {
@apply outline-none ring-2 ring-blue rounded-[4px] shadow-none;
@apply outline-none ring-2 ring-blue rounded-[4px] shadow-none decoration-primary-800;
}

&__target__icon {
Expand Down Expand Up @@ -49,13 +52,33 @@
}
@apply decoration-primary;
}

&--articles {
@apply decoration-primary-500;

&:visited {
@apply text-purple-700 decoration-primary-500;
}

&:hover, &:visited:hover {
@apply decoration-primary;
}

&:focus-visible {
@apply decoration-primary-800;
}
}

&--high-contrast.puik-link--articles {
@apply text-primary decoration-primary;

&:visited {
@apply text-primary decoration-primary;
}

&:visited:hover {
@apply decoration-primary;
}

&:focus-visible {
@apply decoration-primary-800;
Expand Down

0 comments on commit 07e05fc

Please sign in to comment.