aboutsummaryrefslogtreecommitdiffstats
path: root/public/system/storage/vendor/leafo/scssphp/tests/inputs/if.scss
blob: d62b056aeeed22e3aa127c8442353d23ae0e00f2 (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
@function conds($val) {
    @if $val {
        @return "red";
    }

    @return "blue";
}

div {
    @if something {
        color: blue;
    }
}

pre {
    val-1: conds(true);
    val-2: conds(false);
    val-3: conds(null);
    val-4: conds(1);
    val-5: conds(0);
}


span {
    @if false {
        color: red;
    } @else {
        color: blue;
    }

    @if true {
        height: 10px;
    } @else {
        color: 20px;
    }

    @if false {
        height: 10px;
    } @elseif false {
        color: 20px;
    } @else {
        width: 20px;
    }
}

div {
    @if false {
        color: red;
    } @else if false {
        color: green;
    } @else {
        color: blue;
    }

    @if false {
        border-color: red;
    } @else if true {
        border-color: green;
    } @else {
        border-color: blue;
    }

}

// doesn't work in scss, thing loses scope
del {
    @if false {
        $thing: yes;
    } @else {
        $thing: no;
    }

    thing: $thing;
}