123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- .simple(@hi) when (@hi) {
- simple: yellow;
- }
- .something(@hi) when (@hi = cool) {
- something: red;
- }
- .another(@x) when (@x > 10) {
- another: green;
- }
- .flipped(@x) when (@x =< 10) {
- flipped: teal;
- }
- .yeah(@arg) when (isnumber(@arg)) {
- yeah-number: purple @arg;
- }
- .yeah(@arg) when (ispixel(@arg)) {
- yeah-pixel: silver;
- }
- .hello(@arg) when not (@arg) {
- hello: 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) {
- something-complex: blue @x;
- }
- 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));
- }
|