| 1 |
|
| 2 |
|
| 3 |
body { |
| 4 |
color: 1 + 2 + 5; |
| 5 |
color: 1 + 2 * 5 + 5; |
| 6 |
height: 10px/10px; |
| 7 |
color: 10px/2 + 1; |
| 8 |
color: (10px/2); |
| 9 |
bottom: (4/2px); |
| 10 |
top: 1em * (1 * 24px - 0) / 16px; |
| 11 |
left: 1 - 2cm; |
| 12 |
top: (2cm/12px); |
| 13 |
} |
| 14 |
|
| 15 |
div { |
| 16 |
color: 4 == 3; |
| 17 |
color: hello == hello; |
| 18 |
|
| 19 |
color: 4 > 3; |
| 20 |
color: 4 < 3; |
| 21 |
color: what > 3; |
| 22 |
} |
| 23 |
|
| 24 |
|
| 25 |
#units { |
| 26 |
test: 1in + 4cm; |
| 27 |
test: 12mm + 1; |
| 28 |
test: 1 + 3em; |
| 29 |
test: 1mm + 1cm; |
| 30 |
test: 1cm + 1mm; |
| 31 |
} |
| 32 |
|
| 33 |
#modulo { |
| 34 |
test: 3 % 2; |
| 35 |
test: 4cm % 3; |
| 36 |
} |
| 37 |
|
| 38 |
#colors { |
| 39 |
color: red + rgb(1,2,3); |
| 40 |
color: red - rgb(1,2,3); |
| 41 |
color: rgba(1,2,3, 0.5) * rgba(3,4,5, 0.5); |
| 42 |
color: rgba(10,15,20, 0.5) / rgba(2,2,2, 0.5); |
| 43 |
|
| 44 |
color: rgba(1,2,3, 0.5) * 2; |
| 45 |
color: rgba(1,2,3, 0.5) / 2; |
| 46 |
color: rgba(1,2,3, 0.5) + 2; |
| 47 |
color: rgba(1,2,3, 0.5) - 2; |
| 48 |
|
| 49 |
color: blue + 34; |
| 50 |
|
| 51 |
color: #fff == #000; |
| 52 |
color: #fff == #fff; |
| 53 |
|
| 54 |
color: #fff != #000; |
| 55 |
color: #fff != #fff; |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
#preserve { |
| 60 |
hello: what -going; |
| 61 |
hello: what - going; |
| 62 |
} |
| 63 |
|
| 64 |
#strings { |
| 65 |
hello: what -going; |
| 66 |
|
| 67 |
hello: what +going; |
| 68 |
hello: what+going; |
| 69 |
hello: what+ going; |
| 70 |
hello: what + going; |
| 71 |
|
| 72 |
hello: "what" + going; |
| 73 |
hello: going + "what"; |
| 74 |
hello: "what" + "what"; |
| 75 |
} |
| 76 |
|
| 77 |
#negation { |
| 78 |
$num: 100; |
| 79 |
a: -$num + 40; |
| 80 |
b: 10 -$num; |
| 81 |
b: 10 - $num; |
| 82 |
} |
| 83 |
|
| 84 |
#bools-fail { |
| 85 |
and: false and two; |
| 86 |
and: one and two; |
| 87 |
and: one and false; |
| 88 |
|
| 89 |
or: false or two; |
| 90 |
or: one or two; |
| 91 |
or: one or false; |
| 92 |
} |
| 93 |
|
| 94 |
#bools { |
| 95 |
and: (false and two); |
| 96 |
and: (one and two); |
| 97 |
and: (one and false); |
| 98 |
|
| 99 |
or: (false or two); |
| 100 |
or: (one or two); |
| 101 |
or: (one or false); |
| 102 |
} |
| 103 |
|
| 104 |
|
| 105 |
#nots-fail { |
| 106 |
not: not true + 2; |
| 107 |
not: not false; |
| 108 |
not: not 0; |
| 109 |
not: not 1; |
| 110 |
not: not ""; |
| 111 |
not: not hello; |
| 112 |
} |
| 113 |
|
| 114 |
#nots { |
| 115 |
not: (not true) + 2; |
| 116 |
not: (not false); |
| 117 |
not: (not 0); |
| 118 |
not: (not 1); |
| 119 |
not: (not ""); |
| 120 |
not: (not hello); |
| 121 |
} |
| 122 |
|
| 123 |
#string-test { |
| 124 |
str: hi == "hi"; |
| 125 |
str: hi == "no"; |
| 126 |
str: 'yes' == 'yes'; |
| 127 |
|
| 128 |
$var1: "hello"; |
| 129 |
$var2: hello; |
| 130 |
|
| 131 |
str: "#{$var1}" == '#{$var2}'; |
| 132 |
|
| 133 |
str: xhello#{$var1}x == "x#{$var2}hellox"; // xhellohellofalse |
| 134 |
|
| 135 |
str: unit(10px) == px; |
| 136 |
} |
| 137 |
|
| 138 |
|
| 139 |
#special { |
| 140 |
cancel-unit: (10px / 10px); |
| 141 |
} |
| 142 |
|
| 143 |
|
| 144 |
|