Less functionality not fully implemented? [#18422]

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Less functionality not fully implemented? [#18422]

Re: Less functionality not fully implemented?

by drakinite » Thu Oct 14, 2021 9:20 am

I see. After looking, it appears that we're using a really old version of less.js - specifically version 1.3.3, which was released in 2013. I'll talk to Petr about updating it. Tracked as: https://www.ventismedia.com/mantis/view.php?id=18422

Re: Less functionality not fully implemented?

by Dr.Sol » Wed Oct 13, 2021 1:58 pm

Here's an example:

Code: Select all

@a: 25;
@b: 8;
@normaluse: 2;

.f2() {
	background: blue;
}

.f1(@_func) 		when (mod(floor(@_func/@normaluse),2)=1) 	{ .f2(); }

p {
	.f1(@_func:6);
}
There are several .less functions presented on https://lesscss.org/functions/#math-functions and the they are accepted when writing them on lesscss.orgs test page https://lesscss.org/less-preview/, but they seems not working very well in a .less-file for a MM5-skin. I have also seen some other other lack of functions, but that I could solve with writing it in another way. Of course it can be workarounds with this also, but I was only interested hearing if there are any restrictions of not using some functionality in the .less language.

Re: Less functionality not fully implemented?

by drakinite » Wed Oct 13, 2021 12:36 pm

Could you provide an example of what you're attempting to do?

If you're attempting to use a native CSS calc() function, you'll have to use an escaped value with the tilde (~) character (for an example, check skin_checkbox.less and skin_layout.less)

Less functionality not fully implemented? [#18422]

by Dr.Sol » Wed Oct 13, 2021 12:23 pm

Is not all .less language fully implented? It seems like the .less compiler which is used for the skinning doesn’t understand some functions. According to less.org it should be fine using mod, floor and other mathematical functions mentioned on their web site, but when I try using them the monkey refuses to start correctly.

Top