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.

sma
  • 9,449
  • 8
  • 51
  • 80

2 Answers2

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;

keja
  • 1,333
  • 1
  • 14
  • 21
  • 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. – Robert Boyer Aug 21 '15 at 23:51
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

Community
  • 1
  • 1
Zarwan
  • 5,537
  • 4
  • 30
  • 48
  • 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 Boyer Aug 21 '15 at 23:49
  • @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. – seven-phases-max Aug 25 '15 at 18:56