Your IP : 216.73.216.95


Current Path : /var/test/www/opcart/vendor/leafo/scssphp/tests/inputs/
Upload File :
Current File : /var/test/www/opcart/vendor/leafo/scssphp/tests/inputs/functions.scss

@function hello($x) {
    @return $x + 4;
}

@function add($a, $b) {
    @return $a + $b;
}

div {
    color: hello(10px);
    sum: add(11, 12);
}

// make sure values are being reduced before being passed up to previous scope

@function one($a, $b) {
    @return $a $b;
}

@function two($a, $b) {
    @return $a#{$a} $b;
}

@function three($a, $b: default) {
    @return "hello #{$a} and #{$b}"
}

@function all($a...) {
    @return "hello #{$a}"
}

div {
    hello: one(10, 55);
    hello: two(10, 55);
    hello: three(10, 55);
}


@function hello_world() {
    @return 1000;
}

del {
    color: hello-world();
}

div {
    $args: foo bar;
    hello: three($args...);
    hello: three(bar...);
    hello: all(Alice, Bob, Tom);
}

@function stringConcatCompassStyle($start,$last)
{
    // Compass still uses it like this
    @return #{$start}-#{$last};
}

.foo
{   
    test2: stringConcatCompassStyle(-moz,art);
}

@mixin content_test {
    span {
        $color: green;
        @content;
    }
}

@function func_test($c) {
    @return $c + 1;
}

div {
    @include content_test {
        height: func_test(2px);
    }
}