less css operation on invalid type

Viewed 155

I am new to Less and trying to make changes to the Orange Hill Jstree theme. When trying to compile it without any changes at all I get an "operation on invalid type" for the code below which from what I can find googling should be okay. Specifically this line in main.less: .jstree-theme(22px, "@{image-path}32px", 32px);

.jstree-@{theme-name} {
.jstree-theme(22px, "@{image-path}32px", 32px);
&.jstree-rtl .jstree-node {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
}
&.jstree-rtl .jstree-last {
    background: transparent;
}

}

There is a mixin defined for that in another file and everything is properly imported. I'm just pasting the start of the snippet as it's too long.

.jstree-theme (@base-height, @image, @image-height) {
@correction: (@image-height - @base-height) / 2;

I've tried compiling it with the -verbose option but it didn't expand on the error at all.

Any help or pointers is appreciated.

1 Answers

I ran into the exact same issue trying to compile jsTree, the fix that worked for me was to roll back the version of LESS i was using.

Specifically, I was trying to build with v4.1.2 (which is the version grunt-contrib-less uses). When I rolled back to my last used version of LESS v3.0.1 (included in grunt-contrib-less v2.1.0) the issue went away.

Related