Closed ilicmarko closed 9 years ago
This is not the place to ask general Sass questions. Try StackOverflow.
@ilicmarko It looks like you're trying to use jlong's SCSS brightness gist, which calls a sqrt method which isn't implemented in base SASS. You'll need to include one from either a math library or one of your own. Here's a simple one:
@function sqrt ($r) {
$x0: 1;
$x1: $x0;
@for $i from 1 through 10 {
$x1: $x0 - ($x0 * $x0 - abs($r)) / (2 * $x0);
$x0: $x1;
}
@return $x1;
}
Once you've implemented that, the function should behave as expected.
Maybe the title is not so accurate but I am having a problem with sqrt function. This is the function
Part where it fails
Error:
So $number doesn't return a number but the whole function.
How should I fix this?