blob: 20bdf240e3a3b2ee36e21d2c01953da46114fb13 (
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
82
83
84
85
86
87
88
|
.simple(@hi) when (@hi) {
color: yellow;
}
.something(@hi) when (@hi = cool) {
color: red;
}
.another(@x) when (@x > 10) {
color: green;
}
.flipped(@x) when (@x =< 10) {
color: teal;
}
.yeah(@arg) when (isnumber(@arg)) {
color: purple;
}
.yeah(@arg) when (ispixel(@arg)) {
color: silver;
}
.hello(@arg) when not (@arg) {
color: orange;
}
dd {
.simple(true);
.simple(2344px);
}
b {
.something(cool);
.something(birthday);
}
img {
.another(12);
.another(2);
.flipped(12);
.flipped(2);
}
body {
.yeah("world");
.yeah(232px);
.yeah(232);
.hello(true);
}
.something(@x) when (@x) and (@y), not (@x = what) {
color: blue;
}
div {
@y: true;
.something(true);
}
pre {
.something(what);
}
.coloras(@g) when (iscolor(@g)) {
color: true @g;
}
link {
.coloras(red);
.coloras(10px);
.coloras(ffjref);
.coloras(#fff);
.coloras(#fffddd);
.coloras(rgb(0,0,0));
.coloras(rgba(0,0,0, .34));
}
|