blob: 3ac51cf5f88a58c686e5e75912fc9cf4651223c3 (
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
|
div {
color: red#{white} blue;
color: red #{white} blue;
color: red #{white}blue;
color: red#{white}blue;
color: #{umm}#{yeah}#{what};
color: #{stacked};
font-size: 10px/#{something};
font-size: 10px / #{something};
test: "what#{"world"}wrong";
test: "what#{'world'}wrong";
test: "what#{world}wrong";
test: "what"#{world}"wrong";
hi: "what is #{4 + 12} end"
}
// interpolation in selectors
pre {
$var: cool;
#{var} {
color: red;
}
#{var} dad {
color: red;
}
bed#{var}dad {
color: red;
}
}
cool {
@for $x from 1 through 5 {
.thing-#{$x} {
color: red;
}
}
}
a#{b}c#{d}e {
color: red;
}
##{hello}, .#{world}{
color: red;
}
#abc#{hello}yeah, .cool#{world}yes{
color: red;
}
$scope: 2;
div.element:nth-child(#{$scope}n)
{
display: none;
}
// property interpolation
div {
$var: hello;
#{$var}: world;
cool#{$var}:world;
#{$var}one:world;
two#{$var}one:world;
one#{a + b}two: cool;
#{hello}: {
#{world}: red;
#{mold}: white;
#{$var}: blue;
}
}
|