1

I am not super proficient with LESS (I use SCSS/SASS) but am working on someone else's code that appears to have been compiled successfully in the past.

The ONLY thing that's spitting out an error is this:

background: url(@theme-images-dir + 'bx_loader.gif') center center no-repeat #fff;

specifically this error:

SyntaxError: expected ')' got '+' in /Users/rwboyer/2fish/grpin/wp-content/themes/lawyers-attorneys/wpv_theme/assets/css/bxslider.less on line 40, column 36:

@theme-images-dir appears to be defined and included in another less file before this statement is reached.

Any hints as to what is happening here?

Thanks.

0

2 Answers 2

1

Like Zar's saying you cant use +, you have to do it like this:

background: url("@{theme-images-dir}bx_loader.gif") center center no-repeat #fff;

Sign up to request clarification or add additional context in comments.

1 Comment

thanks... that's pretty much the example's i've seen in LESS... aka string interpolation vs concatenation. Odd though the gruntfile build from the theme vendor works? Trying to get this hunk-o-garbage in shape for a front end non-coder to deal with it using codekit and other tools he will ummmm... be okay with.
0

It's a parsing error that's saying that you can't put a '+' in your URL, you need to have a closing parenthesis. I'm betting that string concatenation is not supported. See this to get an alternative to string concatenation: Concatenate strings in Less

2 Comments

thanks... wonder why it works with LESS using the theme vendor's grunt.js build but NOT codekit... the only issue is it's all over the place in the LESS code.
@Robert I doubt it works with grunt.js or so. Most likely theme authors were confused by lessphp language extension where this indeed works like concatenation (but it's never was considered like something to ever come into the reference language implementation). So whereever you've got that code notify its authors it's not valid Less.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.