aboutsummaryrefslogtreecommitdiffstats
path: root/public/system/storage/vendor/leafo/scssphp/tests/inputs/functions.scss
blob: d555ae9fd2d5436679aa05a75265fa596830336a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@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);
    }
}