problems with using isdefined()
I'm trying to use "isdefined()" in a way where I have an if() block to check if the variable is defined, and if the condition returns true, I want to return the value of the variable. But no matter what I do, "isdefined()" either returns false or the complete string: "isdefined(@variable)";
Current behavior:
@a: blue;
@b: if((isdefined(@a)), @a, black);
@b = black
Expected behavior:
@a: blue;
@b: if((isdefined(@a)), @a, black);
@b = blue
also
Current behavior:
@b: isdefined(@a);
@b = false
✅ which is correct
@a:red;
@b: isdefined(@a);
@b = isdefined(red);
❌ .....should be true
Also, not defining @a will always throw an error "@A is undefined"
The funny thing is this works perfectly fine when trying to use this on the less playground.
Environment information:
I tested this in VS code using the CDN links to compile LESS
less version: 4.4.2
operating system: windows
problems with using isdefined()
I'm trying to use "isdefined()" in a way where I have an if() block to check if the variable is defined, and if the condition returns true, I want to return the value of the variable. But no matter what I do, "isdefined()" either returns false or the complete string: "isdefined(@variable)";
Current behavior:
Expected behavior:
also
Current behavior:
✅ which is correct
❌ .....should be true
Also, not defining
@awill always throw an error "@A is undefined"The funny thing is this works perfectly fine when trying to use this on the less playground.
Environment information:
I tested this in VS code using the CDN links to compile LESS
lessversion: 4.4.2operating system: windows