Skip to content

Commit

Permalink
Switch to using BSv5's strategy to compute hover-color
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored and geriom committed Jun 1, 2023
1 parent ec2bf77 commit 1b2ea51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion assets/scss/_boxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
@mixin box-variant($parent, $color-name, $color-value) {
$text-color: color-contrast($color-value);
$link-color: mix($blue, $text-color, lightness($color-value));
$link-hover-color: shade-color($text-color, $link-shade-percentage);
$link-hover-color: if(
color-contrast($link-color) == $color-contrast-light,
shade-color($link-color, $link-shade-percentage),
tint-color($link-color, $link-shade-percentage)
);

#{$parent} {
&--#{$color-name} {
Expand Down

0 comments on commit 1b2ea51

Please sign in to comment.