diff options
Diffstat (limited to 'mod/less/vendors/lessphp/tests/inputs/guards.less')
-rw-r--r-- | mod/less/vendors/lessphp/tests/inputs/guards.less | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/mod/less/vendors/lessphp/tests/inputs/guards.less b/mod/less/vendors/lessphp/tests/inputs/guards.less new file mode 100644 index 000000000..20bdf240e --- /dev/null +++ b/mod/less/vendors/lessphp/tests/inputs/guards.less @@ -0,0 +1,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)); +} + |