Skip to content

Commit

Permalink
feat: utrecht-link--html-a mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Feb 20, 2023
1 parent 5139021 commit fd511ad
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions components/link/css/_mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,39 @@ however browsers don't seem to have implemented great looking supixel tweening y
text-decoration-thickness: unset;
text-underline-offset: unset;
}

@mixin utrecht-link--html-a {
&:visited {
@include utrecht-link--visited;
}

&:link:hover {
@include utrecht-link--hover;
}

&:link:active {
@include utrecht-link--active;
}

// The workaround for missing `:focus-visible` support makes the code quite complex,
// keep the ideal version around to restore it easily when browser support improves.

@if $utrecht-focus-visible-fallback {
&:focus {
@include utrecht-link--focus;
@include utrecht-link--focus-visible;
}

&:focus:not(:focus-visible) {
@include utrecht-focus-ring-reset;
}
} @else {
&:focus {
@include utrecht-link--focus;
}

&:focus-visible {
@include utrecht-link--focus-visible;
}
}
}

1 comment on commit fd511ad

@vercel
Copy link

@vercel vercel bot commented on fd511ad Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.