So I'm not sure why this worked before (maybe because of an outdated lib-sass) but I'm getting a reference error if I don't do this, and that's correct behaviour. In Sass, blocks have their own scope so if you write
@if true == true {
$foo: 'bar';
}
@debug($foo);
an error will get thrown because $foo won't exist in the same scope.
So I'm not sure why this worked before (maybe because of an outdated lib-sass) but I'm getting a reference error if I don't do this, and that's correct behaviour. In Sass, blocks have their own scope so if you write
an error will get thrown because
$foo
won't exist in the same scope.