Warning, /webapps/ocs-webserver/library/lessphp/tests/inputs/guards.less is written in an unsupported language. File is not indexed.
0001
0002 .simple(@hi) when (@hi) {
0003 simple: yellow;
0004 }
0005
0006
0007 .something(@hi) when (@hi = cool) {
0008 something: red;
0009 }
0010
0011 .another(@x) when (@x > 10) {
0012 another: green;
0013 }
0014
0015
0016 .flipped(@x) when (@x =< 10) {
0017 flipped: teal;
0018 }
0019
0020 .yeah(@arg) when (isnumber(@arg)) {
0021 yeah-number: purple @arg;
0022 }
0023
0024
0025 .yeah(@arg) when (ispixel(@arg)) {
0026 yeah-pixel: silver;
0027 }
0028
0029
0030 .hello(@arg) when not (@arg) {
0031 hello: orange;
0032 }
0033
0034 dd {
0035 .simple(true);
0036 .simple(2344px);
0037 }
0038
0039 b {
0040 .something(cool);
0041 .something(birthday);
0042 }
0043
0044 img {
0045 .another(12);
0046 .another(2);
0047
0048 .flipped(12);
0049 .flipped(2);
0050 }
0051
0052 body {
0053 .yeah("world");
0054 .yeah(232px);
0055 .yeah(232);
0056
0057 .hello(true);
0058 }
0059
0060 .something(@x) when (@x) and (@y), not (@x = what) {
0061 something-complex: blue @x;
0062 }
0063
0064 div {
0065 @y: true;
0066 .something(true);
0067
0068 }
0069
0070 pre {
0071 .something(what);
0072 }
0073
0074 .coloras(@g) when (iscolor(@g)) {
0075 color: true @g;
0076 }
0077
0078 link {
0079 .coloras(red);
0080 .coloras(10px);
0081 .coloras(ffjref);
0082 .coloras(#fff);
0083 .coloras(#fffddd);
0084 .coloras(rgb(0,0,0));
0085 .coloras(rgba(0,0,0, .34));
0086 }
0087