Merge pull request #233 from PhilippeVay/link-hover

#232 No styling on a:hover if there's no effect
This commit is contained in:
Raphael Goetter 2016-12-24 11:39:32 +01:00 committed by GitHub
commit 366af95681
2 changed files with 11 additions and 4 deletions

View file

@ -26,6 +26,8 @@ $color5 : #6FA939 !default;
$base-color: $color1; $base-color: $color1;
$link-color: $color3; $link-color: $color3;
$base-background : $color2; $base-background : $color2;
// If you don't want any effect on focused/hovered links,
// comment variable below or make it equal to either $link-color or false or null
$link-hover-color: $color4; $link-hover-color: $color4;
$brand-primary: $color5; $brand-primary: $color5;

View file

@ -30,10 +30,15 @@ body {
a { a {
color: $link-color; color: $link-color;
&:focus, // No styling on focus/hover if there's no effect. Avoids to then have to
&:hover, // override it countless times. See Issue #232
&:active { @if variable_exists(link-hover-color) and
color: $link-hover-color; ( null == index( ($link-color, null, false), $link-hover-color) ) {
&:focus,
&:hover,
&:active {
color: $link-hover-color;
}
} }
} }