I\'m using a ternary-like statement to initialize a variable in Sass. This allows me to set some of my default variables to the same thing that Zurb Foundation is using, but
The "problem" persists because you're using the function incorrectly. The docs paint a very clear picture as to how this function is intended to be used:
$a-false-value: false;
// global-variable-exists(a-false-value) => true
.foo {
$some-var: false;
@if global-variable-exists(some-var) { /* false, doesn't run */ }
}
See how there are no variables being passed to the function? That's because it expects a string that contains the name of the variable, not the variable itself. Passing in the variable itself would defeat the purpose of the function: you can't pass variables that don't exist to functions or mixins.
So... just drop the $
:
$nav-link-icon-color: if( global-variable-exists(topbar-link-color), $topbar-link-color, #fff) !default;