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;
$link-color: $color3;
$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;
$brand-primary: $color5;

View File

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