No effect if variable is null or doesn't exist
This commit is contained in:
parent
d489bd2c86
commit
bd8ed31e5d
2 changed files with 6 additions and 4 deletions
|
@ -26,8 +26,9 @@ $color5 : #6FA939 !default;
|
||||||
$base-color: $color1;
|
$base-color: $color1;
|
||||||
$link-color: $color3;
|
$link-color: $color3;
|
||||||
$base-background : $color2;
|
$base-background : $color2;
|
||||||
$link-hover-color: $color4; // Make it equal to either $link-color or false if you don't want
|
// If you don't want any effect on focused/hovered links,
|
||||||
// any effect on links when focused/hovered
|
// comment variable below or make it equal to either $link-color or false or null
|
||||||
|
$link-hover-color: $color4;
|
||||||
$brand-primary: $color5;
|
$brand-primary: $color5;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,12 @@ a {
|
||||||
|
|
||||||
// No styling on focus/hover if there's no effect. Avoids to then have to
|
// No styling on focus/hover if there's no effect. Avoids to then have to
|
||||||
// override it countless times. See Issue #232
|
// override it countless times. See Issue #232
|
||||||
@if ($link-hover-color != $link-color and $link-hover-color != false) {
|
@if variable_exists(link-hover-color) and
|
||||||
|
( null == index( ($link-color, null, false), $link-hover-color) ) {
|
||||||
&:focus,
|
&:focus,
|
||||||
&:hover,
|
&:hover,
|
||||||
&:active {
|
&:active {
|
||||||
color: $link-hover-color;
|
color: $link-hover-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue